June 2014
Intermediate to advanced
696 pages
38h 52m
English
Templates provide the view for an AngularJS application. HTML elements are defined as controllers, using the ng-controller attribute. Inside a controller HTML element and its children, the scope for that controller is available for expressions and other AngularJS functionality.
Values in a scope can be directly linked to the values of <input>, <select>, and <textarea> elements in the template, using the ng-model directive. This directive links the value of an element to a property name in the scope. When the user changes the value of the input element, the scope is automatically updated. For example, the following links the value of a number of <input> element to the scope named valueA:
Read now
Unlock full access