Summary

The capability to manage events is one of the most critical components in most AngularJS applications. You can use events in AngularJS applications to provide user interaction with elements as well as components of the application communicating with each other to know when to perform certain tasks. This chapter started off with a brief discussion about browser and user interaction events and how they relate to the overall application architecture.

Next the chapter covered using the $watch, $watchGroup, and $watchCollection methods to watch values in the scope. Using watches allows you to act on changes to the scope values without having to place code in every location where those values might change.

Scopes are organized into hierarchies, and the root scope is defined at that application level. Each instance of a controller also gets an instance of a child scope. In this chapter you learned how to emit or broadcast events from within a scope and then implement handlers that listen for those events and get executed when they are triggered.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset