@@ -125,7 +125,7 @@ The short answer is that compile and link separation is needed any time a change
125
125
a change in DOM structure such as in repeaters.
126
126
127
127
When the above example is compiled, the compiler visits every node and looks for directives. The
128
- `{{user}}` is an example of {@link api/ng.$interpolate interpolation} directive. {@link
128
+ `{{user}}` is an example of an {@link api/ng.$interpolate interpolation} directive. {@link
129
129
api/ng.directive:ngRepeat ngRepeat} is another directive. But {@link
130
130
api/ng.directive:ngRepeat ngRepeat} has a dilemma. It needs to be
131
131
able to quickly stamp out new `li`s for every `action` in `user.actions`. This means that it needs
@@ -138,16 +138,16 @@ But compiling on every `li` element clone would be slow, since the compilation r
138
138
traverse the DOM tree and look for directives and execute them. If we put the compilation inside a
139
139
repeater which needs to unroll 100 items we would quickly run into performance problems.
140
140
141
- The solution is to break the compilation process into two phases the compile phase where all of
141
+ The solution is to break the compilation process into two phases; the compile phase where all of
142
142
the directives are identified and sorted by priority, and a linking phase where any work which
143
143
links a specific instance of the {@link api/ng.$rootScope.Scope scope} and the specific
144
144
instance of an `li` is performed.
145
145
146
146
{@link api/ng.directive:ngRepeat ngRepeat} works by preventing the
147
- compilation process form descending into `li` element. Instead the {@link
147
+ compilation process form descending into the `li` element. Instead the {@link
148
148
api/ng.directive:ngRepeat ngRepeat} directive compiles `li`
149
149
separately. The result of of the `li` element compilation is a linking function which contains all
150
- of the directives contained in the `li` element ready to be attached to a specific clone of `li`
150
+ of the directives contained in the `li` element, ready to be attached to a specific clone of the `li`
151
151
element. At runtime the {@link api/ng.directive:ngRepeat ngRepeat}
152
152
watches the expression and as items are added to the array it clones the `li` element, creates a
153
153
new {@link api/ng.$rootScope.Scope scope} for the cloned `li` element and calls the
0 commit comments