send data from one widget to other
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2024 12:23 AM - edited 08-14-2024 12:25 AM
Hi, I have 2 widgets. I want to send a data to other widget. in second widget data is not coming.
Widget 1:
HTML:
<button class="btn btn-primary action-btn pull-right" ng-click="selectItem(item.u_zoom_link)">Register</button>
Client script:
$scope.selectItem= function(eventObj){
alert(eventObj); //Working
c.selectedEvent= eventObj;
$rootScope.$broadcast('showEventDetails', eventObj);
};
Widget 2:
HTML:
<p>
Test: {{c.showForm}} //Not working
</p>
Client Script:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2024 05:19 AM
this link has the approach. you need to broadcast
How to comunicate between widgets - Service Portal
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader