mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +00:00
fix(docs): Fix spelling, punctuation and grammatical errors on dev guide compiler page.
This commit is contained in:
parent
1f2d50000e
commit
2473412ba5
1 changed files with 10 additions and 12 deletions
|
|
@ -104,12 +104,12 @@ Here is a directive which makes any element draggable. Notice the `draggable` at
|
|||
<file name="index.html">
|
||||
<span draggable>Drag ME</span>
|
||||
</file>
|
||||
</file>
|
||||
</example>
|
||||
|
||||
|
||||
The presence of `draggable` attribute an any element gives the element new behavior. The beauty of
|
||||
this approach is that we have thought the browser a new trick, we have extended the vocabulary of
|
||||
what browser understands in a way, which is natural to anyone who is familiar with HTML
|
||||
The presence of `draggable` attribute on any element gives the element new behavior. The beauty of
|
||||
this approach is that we have taught the browser a new trick. We have extended the vocabulary of
|
||||
what the browser understands in a way, which is natural to anyone who is familiar with HTML
|
||||
principles.
|
||||
|
||||
|
||||
|
|
@ -121,23 +121,21 @@ an element.
|
|||
|
||||
<img src="img/One_Way_Data_Binding.png">
|
||||
|
||||
This means that any changes to the data, need to be re-merged with the template and then
|
||||
This means that any changes to the data need to be re-merged with the template and then
|
||||
`innerHTML`ed into the DOM. Some of the issues are: reading user input and merging it with data,
|
||||
clobbering user input by overwriting it, managing the whole update process, and lack of behavior
|
||||
expressiveness.
|
||||
|
||||
Angular is different. Angular compiler consumes DOM with directives, not string templates. The
|
||||
result is a linking function, which when combined with a scope model results in live view. The
|
||||
view and scope model bindings are transparent, no action from the developer is needed to update
|
||||
Angular is different. The Angular compiler consumes the DOM with directives, not string templates.
|
||||
The result is a linking function, which when combined with a scope model results in a live view. The
|
||||
view and scope model bindings are transparent. No action from the developer is needed to update
|
||||
the view. And because no `innerHTML` is used there are no issues of clobbering user input.
|
||||
Furthermore, angular directives can contain not just text bindings, but behavioral constructs as
|
||||
Furthermore, Angular directives can contain not just text bindings, but behavioral constructs as
|
||||
well.
|
||||
|
||||
<img src="img/Two_Way_Data_Binding.png">
|
||||
|
||||
The Angular approach produces stable DOM. This means that the DOM element instance bound to model
|
||||
The Angular approach produces a stable DOM. This means that the DOM element instance bound to a model
|
||||
item instance does not change for the lifetime of the binding. This means that the code can get
|
||||
hold of the elements and register event handlers and know that the reference will not be destroyed
|
||||
by template data merge.
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue