Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I send an object with $broadcast?

Tags:

angularjs

People also ask

What method is used to send a broadcast event?

Android uses Broadcast Intents extensively to broadcast system events like battery-charging levels, network connections, and incoming calls. Broadcasting Intents is actually quite simple. Within your application component, construct the Intent you want to broadcast, and use the sendBroadcast method to send it.

What device is used to receive broadcast and send some messages?

In radio communications, a radio receiver, also known as a receiver, a wireless, or simply a radio, is an electronic device that receives radio waves and converts the information carried by them to a usable form.


That's because listener function has two arguments being passed into it, event, and args. See the angular docs.

Try:

$rootScope.$on("tableDataUpdated", function (event, args) {
        alert(args.state);
    });