Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit a035e88

Browse files
committed
docs(guide): fix directives guide docs
1 parent 3548fe3 commit a035e88

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

docs/content/guide/dev_guide.compiler.directives.ngdoc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ directives per element.
1515
You add angular directives to a standard HTML tag as in the following example, in which we have
1616
added 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

2424
In 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
3030
binding} between the data model and the view for the specified expression. When the angular {@link
3131
dev_guide.compiler compiler} encounters an `ng:bind` directive in a template, it passes the
3232
attribute 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

Comments
 (0)