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 element that represent them. 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. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access