Directives That Bind the Model to Page Elements
AngularJS templates enable you to bind data in the scope directly to what is displayed in HTML elements. You can bind data to the view in several different ways, including:
Value: You can directly represent the value of a form element in the scope. For example, a text input can be a String
variable in the scope, but a check box would be represented by a Boolean
value.
HTML: You can represent the value of data in the scope in the HTML output of an element by using expressions such as:
<p>{{myTitle}}</p> ...
Get Node.js, MongoDB, and AngularJS Web Development 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.