In Angular JS events propagates in two ways, from parent to child or child to parent controller i.e. vise-versa.
To propagate event from parent to child we should use $broadcast.
To propagate event from child to parent we should use $emit.
Here is the plunker example.
https://plnkr.co/edit/?p=preview
To propagate event from parent to child we should use $broadcast.
To propagate event from child to parent we should use $emit.
Here is the plunker example.
https://plnkr.co/edit/?p=preview
No comments:
Post a Comment