Sep 18, 2013

AngularJS communicating between controllers

The previous posts covered AngularJS big picture : Overview and Working with Angular JS and jQuery UI : writing a custome directive. Let's look at inter controller communication in this blog post.Q. How do you communicate between controllers in AngularJS?A. There are scenarios where you want to communicate between controllers. For example, when the submit button is clicked on the parent controller, some values need to be passed to the child controller to show or hide a button in the child form. In AngularJS you can do this with $watch and $broadcast on the parent controller and $on on the child controller.