EventBroadCasters

EventBroadCasters

EventBroadCaster is Centralize Singleton Static Class use to Broadcast Events in Application on Application Channel or Navigation Channel from Publisher to Subscribers Objects such View, ViewNavigator, ViewManager, Component etc.

Supports Event Communication with One to One , One to Many pattern

Constructor

new EventBroadCasters()

Source:
Examples
Publish using Navigation Channel
       //create Navigation Event
       let helloNavEvent = new NavigationEvent(EventUtils.NAV_CHANGE_EVENT, "Hello_NavEvent", "Message :: Hello World !!!", "/hello");

       // Dispatch Navigation Event on Navigation Event Channel
       EventBroadCaster.navEventChannel.dispatchEvent(navEvent);

       
Subscribe using Navigation Channel to Receive Navigation Event
       
       EventBroadCaster.navEventChannel.addEventListener(EventUtils.NAV_CHANGE_EVENT, event => { this.handleNavChangeEvent(event); });