In your AngularJS application, you can use $broadcast() and $emit() to raise an event. The difference between $broadcast() and $emit() is that the former sends the event from the current controller to all of its child controllers, while the latter sends the event from the current controller to all of its child controllers. This indicates that $broadcast() transmits an even number of messages from the parent controller to the child controllers.
$broadcast is used to broadcast a "global" event that any listener inside that scope can hear. Using $scope, descendant scopes can catch and handle this event.
It sends a notification to the registered $rootScope and sends an event name to all child scopes (and their children). Listeners should be scoped. The life cycle of an event begins at the scope where $broadcast was called. On this scope, all listeners for the event are notified.
You must implement the IlluminateContractsBroadcastingShouldBroadcast interface on the event class to tell Laravel that an event should be broadcast. This interface is already included in all of the framework's event classes, so you can quickly add it to any of your own.
Learner's Ratings
4
Overall Rating
64%
16%
2%
11%
7%
Reviews
N
NAVNEET MAHESWARI
5
EASY TO LEARN
P
Prabhat Yadav
5
Amazing course content and easy to understand.
A
Aparna K
5
Excellent
R
Rambo Krish
5
sds
S
Shraddha Naik
5
Good
K
Kijima
5
Very good
L
LAXMAN GOVIND RATHOD
5
The Advanced AngularJS Course was good and included all the topics to find a good job in my City.
V
V.phanindra babu
4
The Advanced AngularJS Course was good and included all the topics to find a good job in my City.
P
Prakriti
4
The Advanced AngularJS Course was good and included all the topics to find a good job in my City.
V
Virender morya
5
Hello
Show More
Recommended Courses
The Complete JavaScript Course - Beginner to Advance
Share a personalized message with your friends.