Improve this doc

Depending on the context of the discussion in the Angular documentation, the term model can refer to either a single object representing one entity (for example, a model called "phones" with its value being an array of phones) or the entire data model for the application (all entities).

In Angular, a model is any data that is reachable as a property of an angular Scope object. The name of the property is the model identifier and the value is any JavaScript object (including arrays and primitives).

The only requirement for a JavaScript object to be a model in Angular is that the object must be referenced by an Angular scope as a property of that scope object. This property reference can be created explicitly or implicitly.

You can create models by explicitly creating scope properties referencing JavaScript objects in the following ways:

Angular creates models implicitly (by creating a scope property and assigning it a suitable value) when processing the following template constructs:

In Angular, a JavaScript object stops being a model when:

The following illustration shows a simple data model created implicitly from a simple template:

Related Topics