Added by: Sam Deering
Demo using services and broadcast messaging to share data between controllers in AngualrJS
I recently wrote a blog post with some basic lessons learned after using AngularJS for a while. In it I briefly described a pattern of using broadcast messages with services to share data between controllers in AngularJS. I was asked if there were any examples online. Here is an example.
This pattern can be useful when you have multiple controllers on a page, some of which need to know when data managed by another controller has been changed.
Module stats last updated: 2017-04-30 16:00:04