This is a very basic example of parent and child communication in AngularJS using Broadcast and Emit.
The parent element’s controller talks to the child element’s controller using $broadcast while the child element’s controller talks to the parent element’s controller using $emit.