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

Commit 48b86a4

Browse files
Stéphane Reynaudpetebacondarwin
Stéphane Reynaud
authored andcommitted
docs(guide/scope): fix url-based links refs to AUTO module
Closes #6382
1 parent f827d64 commit 48b86a4

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

docs/content/guide/scope.ngdoc

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ To examine the scope in the debugger:
187187
## Scope Events Propagation
188188

189189
Scopes can propagate events in similar fashion to DOM events. The event can be {@link
190-
api/ng.$rootScope.Scope#methods_$broadcast broadcasted} to the scope children or {@link
191-
api/ng.$rootScope.Scope#methods_$emit emitted} to scope parents.
190+
ng.$rootScope.Scope#methods_$broadcast broadcasted} to the scope children or {@link
191+
ng.$rootScope.Scope#methods_$emit emitted} to scope parents.
192192

193193
<example>
194194
<file name="script.js">
@@ -230,14 +230,14 @@ more events.
230230
When the browser calls into JavaScript the code executes outside the Angular execution context,
231231
which means that Angular is unaware of model modifications. To properly process model
232232
modifications the execution has to enter the Angular execution context using the {@link
233-
api/ng.$rootScope.Scope#methods_$apply `$apply`} method. Only model modifications which
233+
ng.$rootScope.Scope#methods_$apply `$apply`} method. Only model modifications which
234234
execute inside the `$apply` method will be properly accounted for by Angular. For example if a
235235
directive listens on DOM events, such as {@link
236-
api/ng.directive:ngClick `ng-click`} it must evaluate the
236+
ng.directive:ngClick `ng-click`} it must evaluate the
237237
expression inside the `$apply` method.
238238

239239
After evaluating the expression, the `$apply` method performs a {@link
240-
api/ng.$rootScope.Scope#methods_$digest `$digest`}. In the $digest phase the scope examines all
240+
ng.$rootScope.Scope#methods_$digest `$digest`}. In the $digest phase the scope examines all
241241
of the `$watch` expressions and compares them with the previous value. This dirty checking is done
242242
asynchronously. This means that assignment such as `$scope.username="angular"` will not
243243
immediately cause a `$watch` to be notified, instead the `$watch` notification is delayed until
@@ -255,13 +255,13 @@ the `$digest` phase. This delay is desirable, since it coalesces multiple model
255255
2. **Watcher registration**
256256

257257
During template linking directives register {@link
258-
api/ng.$rootScope.Scope#methods_$watch watches} on the scope. These watches will be
258+
ng.$rootScope.Scope#methods_$watch watches} on the scope. These watches will be
259259
used to propagate model values to the DOM.
260260

261261
3. **Model mutation**
262262

263263
For mutations to be properly observed, you should make them only within the {@link
264-
api/ng.$rootScope.Scope#methods_$apply scope.$apply()}. (Angular APIs do this
264+
ng.$rootScope.Scope#methods_$apply scope.$apply()}. (Angular APIs do this
265265
implicitly, so no extra `$apply` call is needed when doing synchronous work in controllers,
266266
or asynchronous work with {@link ng.$http $http}, {@link ng.$timeout $timeout}
267267
or {@link ng.$interval $interval} services.
@@ -284,30 +284,30 @@ the `$digest` phase. This delay is desirable, since it coalesces multiple model
284284
### Scopes and Directives
285285

286286
During the compilation phase, the {@link compiler compiler} matches {@link
287-
api/ng.$compileProvider#methods_directive directives} against the DOM template. The directives
287+
ng.$compileProvider#methods_directive directives} against the DOM template. The directives
288288
usually fall into one of two categories:
289289

290290
- Observing {@link ng.$compileProvider#methods_directive directives}, such as
291291
double-curly expressions `{{expression}}`, register listeners using the {@link
292-
api/ng.$rootScope.Scope#methods_$watch $watch()} method. This type of directive needs
292+
ng.$rootScope.Scope#methods_$watch $watch()} method. This type of directive needs
293293
to be notified whenever the expression changes so that it can update the view.
294294

295295
- Listener directives, such as {@link ng.directive:ngClick
296296
ng-click}, register a listener with the DOM. When the DOM listener fires, the directive
297297
executes the associated expression and updates the view using the {@link
298-
api/ng.$rootScope.Scope#methods_$apply $apply()} method.
298+
ng.$rootScope.Scope#methods_$apply $apply()} method.
299299

300300
When an external event (such as a user action, timer or XHR) is received, the associated {@link
301301
expression expression} must be applied to the scope through the {@link
302-
api/ng.$rootScope.Scope#methods_$apply $apply()} method so that all listeners are updated
302+
ng.$rootScope.Scope#methods_$apply $apply()} method so that all listeners are updated
303303
correctly.
304304

305305
### Directives that Create Scopes
306306

307307
In most cases, {@link ng.$compileProvider#methods_directive directives} and scopes interact
308308
but do not create new instances of scope. However, some directives, such as {@link
309-
api/ng.directive:ngController ng-controller} and {@link
310-
api/ng.directive:ngRepeat ng-repeat}, create new child scopes
309+
ng.directive:ngController ng-controller} and {@link
310+
ng.directive:ngRepeat ng-repeat}, create new child scopes
311311
and attach the child scope to the corresponding DOM element. You can retrieve a scope for any DOM
312312
element by using an `angular.element(aDomElement).scope()` method call.
313313
See the {@link guide/directive#creating-custom-directives_demo_isolating-the-scope-of-a-directive
@@ -318,7 +318,7 @@ directives guide} for more information about isolate scopes.
318318
Scopes and controllers interact with each other in the following situations:
319319

320320
- Controllers use scopes to expose controller methods to templates (see {@link
321-
api/ng.directive:ngController ng-controller}).
321+
ng.directive:ngController ng-controller}).
322322

323323
- Controllers define methods (behavior) that can mutate the model (properties on the scope).
324324

@@ -357,14 +357,14 @@ directive which is handling the event. An explicit call to $apply is needed only
357357
implementing custom event callbacks, or when working with third-party library callbacks.
358358

359359
1. Enter Angular execution context by calling {@link guide/scope scope}`.`{@link
360-
api/ng.$rootScope.Scope#methods_$apply $apply}`(stimulusFn)`. Where `stimulusFn` is
360+
ng.$rootScope.Scope#methods_$apply $apply}`(stimulusFn)`. Where `stimulusFn` is
361361
the work you wish to do in Angular execution context.
362362
2. Angular executes the `stimulusFn()`, which typically modifies application state.
363363
3. Angular enters the {@link ng.$rootScope.Scope#methods_$digest $digest} loop. The
364364
loop is made up of two smaller loops which process {@link
365-
api/ng.$rootScope.Scope#methods_$evalAsync $evalAsync} queue and the {@link
366-
api/ng.$rootScope.Scope#methods_$watch $watch} list. The {@link
367-
api/ng.$rootScope.Scope#methods_$digest $digest} loop keeps iterating until the model
365+
ng.$rootScope.Scope#methods_$evalAsync $evalAsync} queue and the {@link
366+
ng.$rootScope.Scope#methods_$watch $watch} list. The {@link
367+
ng.$rootScope.Scope#methods_$digest $digest} loop keeps iterating until the model
368368
stabilizes, which means that the {@link ng.$rootScope.Scope#methods_$evalAsync
369369
$evalAsync} queue is empty and the {@link ng.$rootScope.Scope#methods_$watch
370370
$watch} list does not detect any changes.
@@ -386,7 +386,7 @@ user enters text into the text field.
386386

387387
1. During the compilation phase:
388388
1. the {@link ng.directive:ngModel ng-model} and {@link
389-
api/ng.directive:input input} {@link guide/directive
389+
ng.directive:input input} {@link guide/directive
390390
directive} set up a `keydown` listener on the `<input>` control.
391391
2. the {@link ng.$interpolate &#123;&#123;name&#125;&#125; } interpolation
392392
sets up a {@link ng.$rootScope.Scope#methods_$watch $watch} to be notified of
@@ -395,7 +395,7 @@ user enters text into the text field.
395395
1. Pressing an '`X`' key causes the browser to emit a `keydown` event on the input control.
396396
2. The {@link ng.directive:input input} directive
397397
captures the change to the input's value and calls {@link
398-
api/ng.$rootScope.Scope#methods_$apply $apply}`("name = 'X';")` to update the
398+
ng.$rootScope.Scope#methods_$apply $apply}`("name = 'X';")` to update the
399399
application model inside the Angular execution context.
400400
3. Angular applies the `name = 'X';` to the model.
401401
4. The {@link ng.$rootScope.Scope#methods_$digest $digest} loop begins

0 commit comments

Comments
 (0)