Broadcase is not working properly in the walk up experience module portal
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2024 12:41 AM
HI All ,
This script is not working properly .while using broadcast method value is not coming in the alert(data). I am using code in the client script.
widget -1
c.data.controller = recordIds;
c.server.update().then(function(resp) {
c.data.controller = '';
c.data.waitingList=resp.formattedwaitingList;
var ab=JSON.stringify(c.data.waitingList);
console.log('test_296'+JSON.stringify(c.data.waitingList))
$rootScope.$broadcast('rakesh',ab);
//alert(ab);
})
widget-2
alert('test133');
$rootScope.$on('rakesh',function(event,data){
alert('test133');
alert(data);
})
Thanks , Rakesh
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2024 12:38 AM
- Try to use console.log('Event received:', data); to check functional called correctly.
- Trr to use this api.controller = function($scope, $rootScope, spModal)
$rootScope.$on('rakesh',function(event,data){
spModal.alert(data);
If you find this as helpful and rectified your problem please mark as accepted solution and give thumbs up