Scopes and the Data Model

AngularJS introduces the concept of a scope. A scope is really just a JavaScript representation of data used to populate a view presented on a web page. The data can come from any source, such as a database, a remote web service, or the client-side AngularJS code, or it can be dynamically generated by the web server.

A great feature of scopes is that they are just plain JavaScript objects, which means you can manipulate them as needed in your AngularJS code with ease. Also, you can nest scopes to organize your data to match the context that they are being used in.

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.