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

Commit

Permalink
fix(docs): Fix spelling, punctuation and grammatical errors on dev gu…
Browse files Browse the repository at this point in the history
…ide compiler page.
  • Loading branch information
jamiekrug authored and btford committed Jul 16, 2012
1 parent 1f2d500 commit 2473412
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions docs/content/guide/compiler.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.


Expand All @@ -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.


0 comments on commit 2473412

Please sign in to comment.