4. Implementing the Scope as a Data Model

One of the most important aspects of an AngularJS application is scope. Scope not only provides the data represented in a model but also binds together all the other components of the AngularJS application, such as modules, controllers, services, and templates. This chapter explains the relationships between scope and other AngularJS components.

Scope provides the binding mechanism that enables DOM elements and other code to be updated when changes occur in the model data. In this chapter you will learn about the root scope and child scopes. You will also learn about the scope hierarchies and how to implement them.

Get Learning AngularJS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.