@@ -15,11 +15,11 @@ directives per element.
1515You add angular directives to a standard HTML tag as in the following example, in which we have
1616added the {@link api/angular.directive.ng:click ng:click} directive to a button tag:
1717
18- <button ng:model="button1" ng: click="foo()">Click This</button>
18+ <button ng:click="foo()">Click This</button>
1919
20- In the example above, `name` is the standard HTML attribute, and `ng:click` is the angular
21- directive. The `ng:click` directive lets you implement custom behavior in an associated controller
22- function .
20+ The `ng:click` directive lets you specify click event handlers directly in the template. Unlike the
21+ evil `onclick` attribute, the expression associated with the `ng:click` directive is always executed
22+ in the context of the current angular scope .
2323
2424In the next example, we add the {@link api/angular.directive.ng:bind ng:bind} directive to a
2525`<span>` tag:
@@ -30,8 +30,9 @@ The `ng:bind` directive tells angular to set up {@link dev_guide.templates.datab
3030binding} between the data model and the view for the specified expression. When the angular {@link
3131dev_guide.compiler compiler} encounters an `ng:bind` directive in a template, it passes the
3232attribute value to the `ng:bind` function, which in turn sets up the data binding. On any change to
33- the expression in the model, the view is updated to display the span text with the changed
34- expression value.
33+ the model that would change the result of the expression, the view is updated and the text of the
34+ span element will reflect the new value. In the example above, the model is represented by two
35+ constants, so nothing will ever change - Sorry!
3536
3637
3738## Related Topics
0 commit comments