Summary

A scope is the definitive source for data in AngularJS applications. A scope has direct relationships with the template views, controllers, modules, and services and acts as the glue that binds the application together. A scope also acts as a representation of a database or another server-side data source.

The scope life cycle is linked to the browser event loop so that changes in the browser can change the scope, and changes in the scope are reflected in the DOM elements that are bound to the scope. You can also add custom watch functions that are notified when the scope changes.

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. From the child scopes you can access data that is stored in the parent scope hierarchy.

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

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