$rootScope.$on on Catalog Client Script?

JDX7913
Tera Guru

Is it possible to use $rootScope.$on for a catalog client script? 

function onLoad($rootScope) {
   $rootScope.$on(....);
}

If that is not possible then is there another way to do this? I know I can put the info in the URL. However, if I can avoid putting things in the URL than that would be great. 

 

Also, I am broadcasting from a widget, don't know if that will help. 

1 ACCEPTED SOLUTION

Thank you for that information.

However, I was able to get around the problem by putting the catalog item as a record producer writing a script that would grab the info from an onLoad script and in that onLoad script I called AJAX to get the info I need from the table on the server. 

View solution in original post

2 REPLIES 2

ChrisBurks
Mega Sage

Can't be done within a catalog client script but it can be done within a widget that is tied to a catalog item as a variable type UI macro.

Are you able to describe more what it is that needs to be done?

Thank you for that information.

However, I was able to get around the problem by putting the catalog item as a record producer writing a script that would grab the info from an onLoad script and in that onLoad script I called AJAX to get the info I need from the table on the server.