Skip to content

Commit 5c25248

Browse files
naomiblackmhevery
authored andcommitted
docs(x-ref links): Change links to use dgeni syntax
Closes angular#1440
1 parent 64ad74a commit 5c25248

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+259
-249
lines changed

modules/angular2/di_annotations.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
* @module
33
* @public
44
* @description
5-
* Annotations which controll how the dependencies are resolved by the [Injector].
5+
* Annotations which control how the dependencies are resolved by the {@link Injector}.
66
*/
77

modules/angular2/di_errors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
* @module
33
* @public
44
* @description
5-
* Errors thrown by the [Injector].
5+
* Errors thrown by the {@link Injector}.
66
*/
77

modules/angular2/forms.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
* @module
33
* @public
44
* @description
5-
* This module is used for handling user input, by defining and building a [FormObject] that consists of [Control]
6-
* objects, and mapping them onto the DOM. [Control] objects can then be used to read information from the form DOM
7-
* elements.
5+
* This module is used for handling user input, by defining and building a {@link ControlGroup} that consists of
6+
* {@link Control} objects, and mapping them onto the DOM. {@link Control} objects can then be used to read information
7+
* from the form DOM elements.
88
*
99
* This module is not included in the `angular2` module; you must import the forms module explicitly.
1010
*

modules/angular2/src/change_detection/change_detection.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export var defaultPipes = {
3232
"keyValDiff" : keyValDiff
3333
};
3434

35+
3536
/**
3637
* @exportedAs angular2/change_detection
3738
*/
@@ -66,4 +67,4 @@ export class JitChangeDetection extends ChangeDetection {
6667
}
6768
}
6869

69-
export var defaultPipeRegistry = new PipeRegistry(defaultPipes);
70+
export var defaultPipeRegistry = new PipeRegistry(defaultPipes);

modules/angular2/src/change_detection/change_detector_ref.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {CHECK_ONCE, DETACHED, CHECK_ALWAYS} from './constants';
44
/**
55
* Controls change detection.
66
*
7-
* [ChangeDetectorRef] allows requesting checks for detectors that rely on observables. It also allows detaching and
7+
* {@link ChangeDetectorRef} allows requesting checks for detectors that rely on observables. It also allows detaching and
88
* attaching change detector subtrees.
99
*
1010
* @exportedAs angular2/change_detection
@@ -42,4 +42,4 @@ export class ChangeDetectorRef {
4242
this._cd.mode = CHECK_ALWAYS;
4343
this.requestCheck();
4444
}
45-
}
45+
}

modules/angular2/src/change_detection/interfaces.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@ export class ProtoChangeDetector {
1414
*
1515
* Angular implements the following change detection strategies by default:
1616
*
17-
* - [dynamicChangeDetection]: slower, but does not require `eval()`.
18-
* - [jitChangeDetection]: faster, but requires `eval()`.
17+
* - {@link DynamicChangeDetection}: slower, but does not require `eval()`.
18+
* - {@link JitChangeDetection}: faster, but requires `eval()`.
1919
*
20-
* In JavaScript, you should always use `jitChangeDetection`, unless you are in an environment that has
20+
* In JavaScript, you should always use `JitChangeDetection`, unless you are in an environment that has
2121
* [CSP](https://developer.mozilla.org/en-US/docs/Web/Security/CSP), such as a Chrome Extension.
2222
*
23-
* In Dart, use `dynamicChangeDetection` during development. The Angular transformer generates an analog to the
24-
* `jitChangeDetection` strategy at compile time.
23+
* In Dart, use `DynamicChangeDetection` during development. The Angular transformer generates an analog to the
24+
* `JitChangeDetection` strategy at compile time.
2525
*
2626
*
27-
* See: [dynamicChangeDetection], [jitChangeDetection]
27+
* See: {@link DynamicChangeDetection}, {@link JitChangeDetection}
2828
*
2929
* # Example
3030
* ```javascript

modules/angular2/src/change_detection/pipes/iterable_changes.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,10 @@ export class IterableChanges extends Pipe {
210210
/**
211211
* This is the core function which handles differences between collections.
212212
*
213-
* - [record] is the record which we saw at this position last time. If null then it is a new
213+
* - `record` is the record which we saw at this position last time. If null then it is a new
214214
* item.
215-
* - [item] is the current item in the collection
216-
* - [index] is the position of the item in the collection
215+
* - `item` is the current item in the collection
216+
* - `index` is the position of the item in the collection
217217
*/
218218
_mismatch(record:CollectionChangeRecord, item, index:int):CollectionChangeRecord {
219219
// The previous record after which we will append the current one.
@@ -284,9 +284,9 @@ export class IterableChanges extends Pipe {
284284
}
285285

286286
/**
287-
* Get rid of any excess [CollectionChangeRecord]s from the previous collection
287+
* Get rid of any excess {@link CollectionChangeRecord}s from the previous collection
288288
*
289-
* - [record] The first excess [CollectionChangeRecord].
289+
* - `record` The first excess {@link CollectionChangeRecord}.
290290
*/
291291
_truncate(record:CollectionChangeRecord) {
292292
// Anything after that needs to be removed;
@@ -588,7 +588,7 @@ class _DuplicateItemRecordList {
588588
}
589589

590590
/**
591-
* Remove one [CollectionChangeRecord] from the list of duplicates.
591+
* Remove one {@link CollectionChangeRecord} from the list of duplicates.
592592
*
593593
* Returns whether the list of duplicates is empty.
594594
*/
@@ -651,7 +651,7 @@ class _DuplicateMap {
651651
}
652652

653653
/**
654-
* Removes an [CollectionChangeRecord] from the list of duplicates.
654+
* Removes a {@link CollectionChangeRecord} from the list of duplicates.
655655
*
656656
* The list of duplicates also is removed from the map if it gets empty.
657657
*/

modules/angular2/src/change_detection/pipes/pipe.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Indicates that the result of a [Pipe] transformation has not changed since the last time the pipe was called.
2+
* Indicates that the result of a {@link Pipe} transformation has not changed since the last time the pipe was called.
33
*
44
* Suppose we have a pipe that computes changes in an array by performing a simple diff operation. If
55
* we call this pipe with the same array twice, it will return `NO_CHANGE` the second time.
@@ -12,7 +12,7 @@ export var NO_CHANGE = new Object();
1212
/**
1313
* An interface for extending the list of pipes known to Angular.
1414
*
15-
* If you are writing a custom [Pipe], you must extend this interface.
15+
* If you are writing a custom {@link Pipe}, you must extend this interface.
1616
*
1717
* #Example
1818
*

modules/angular2/src/core/annotations/annotations.js

Lines changed: 48 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -8,54 +8,54 @@ import {DEFAULT} from 'angular2/change_detection';
88
/**
99
* Directives allow you to attach behavior to elements in the DOM.
1010
*
11-
* Directive is an abstract concept, instead use concrete directives: [Component], [DynamicComponent], [Decorator]
12-
* or [Viewport].
11+
* Directive is an abstract concept, instead use concrete directives: {@link Component}, {@link DynamicComponent}, {@link Decorator}
12+
* or {@link Viewport}.
1313
*
14-
* A directive consists of a single directive annotation and a controller class. When the directive's [selector] matches
14+
* A directive consists of a single directive annotation and a controller class. When the directive's `selector` matches
1515
* elements in the DOM, the following steps occur:
1616
*
17-
* 1. For each directive, the [ElementInjector] attempts to resolve the directive's constructor arguments.
18-
* 2. Angular instantiates directives for each matched element using [ElementInjector] in a depth-first order,
17+
* 1. For each directive, the `ElementInjector` attempts to resolve the directive's constructor arguments.
18+
* 2. Angular instantiates directives for each matched element using `ElementInjector` in a depth-first order,
1919
* as declared in the HTML.
2020
*
2121
* ## Understanding How Injection Works
2222
*
2323
* There are three stages of injection resolution.
2424
* - *Pre-existing Injectors*:
25-
* - The terminal [Injector] cannot resolve dependencies. It either throws an error or, if the dependency was
25+
* - The terminal {@link Injector} cannot resolve dependencies. It either throws an error or, if the dependency was
2626
* specified as `@Optional`, returns `null`.
2727
* - The platform injector resolves browser singleton resources, such as: cookies, title, location, and others.
28-
* - *Component Injectors*: Each `@Component` has its own [Injector], and they follow the same parent-child hierarchy
28+
* - *Component Injectors*: Each `@Component` has its own {@link Injector}, and they follow the same parent-child hierarchy
2929
* as the components in the DOM.
30-
* - *Element Injectors*: Each component has a Shadow DOM. Within the Shadow DOM each element has an [ElementInjector]
30+
* - *Element Injectors*: Each component has a Shadow DOM. Within the Shadow DOM each element has an `ElementInjector`
3131
* which follow the same parent-child hierarchy as the DOM elements themselves.
3232
*
3333
* When a template is instantiated, it also must instantiate the corresponding directives in a depth-first order. The
34-
* current [ElementInjector] resolves the constructor dependencies for each directive.
34+
* current `ElementInjector` resolves the constructor dependencies for each directive.
3535
*
36-
* Angular then resolves dependencies as follows, according to the order in which they appear in the [View]:
36+
* Angular then resolves dependencies as follows, according to the order in which they appear in the {@link View}:
3737
*
3838
* 1. Dependencies on the current element
3939
* 2. Dependencies on element injectors and their parents until it encounters a Shadow DOM boundary
4040
* 3. Dependencies on component injectors and their parents until it encounters the root component
4141
* 4. Dependencies on pre-existing injectors
4242
*
4343
*
44-
* The [ElementInjector] can inject other directives, element-specific special objects, or it can delegate to the parent
44+
* The `ElementInjector` can inject other directives, element-specific special objects, or it can delegate to the parent
4545
* injector.
4646
*
4747
* To inject other directives, declare the constructor parameter as:
4848
* - `directive:DirectiveType`: a directive on the current element only
4949
* - `@Ancestor() directive:DirectiveType`: any directive that matches the type between the current element and the
50-
* Shadow DOM root. Current element is not included in the resolution, therefor even if it could resolve it, it will
50+
* Shadow DOM root. Current element is not included in the resolution, therefore even if it could resolve it, it will
5151
* be ignored.
5252
* - `@Parent() directive:DirectiveType`: any directive that matches the type on a direct parent element only.
53-
* - `@Children query:Query<DirectiveType>`: A live collection of direct child directives [TO BE IMPLEMENTED].
54-
* - `@Descendants query:Query<DirectiveType>`: A live collection of any child directives [TO BE IMPLEMENTED].
53+
* - `@Children query:Query<DirectiveType>`: A live collection of direct child directives (will be implemented in later release).
54+
* - `@Descendants query:Query<DirectiveType>`: A live collection of any child directives (will be implemented in later relaese).
5555
*
5656
* To inject element-specific special objects, declare the constructor parameter as:
5757
* - `element: NgElement` to obtain a DOM element (DEPRECATED: replacement coming)
58-
* - `viewContainer: ViewContainer` to control child template instantiation, for [Viewport] directives only
58+
* - `viewContainer: ViewContainer` to control child template instantiation, for {@link Viewport} directives only
5959
* - `bindingPropagation: BindingPropagation` to control change detection in a more granular way.
6060
*
6161
* ## Example
@@ -184,32 +184,35 @@ import {DEFAULT} from 'angular2/change_detection';
184184
* `dependency="1"`.
185185
*
186186
*
187-
* ### Injecting a live collection of direct child directives [PENDING IMPLEMENTATION]
187+
* ### Injecting a live collection of direct child directives
188+
*
188189
*
189190
* A directive can also query for other child directives. Since parent directives are instantiated before child
190-
* directives, a directive can't simply inject the list of child directives. Instead, the directive asynchronously
191-
* injects a [Query], which updates as children are added, removed, or moved by any [ViewPort] directive such as a
192-
* `for`, an `if`, or a `switch`.
191+
* directives, a directive can't simply inject the list of child directives. Instead, the directive
192+
* injects a {@link QueryList}, which updates its contents as children are added, removed, or moved by any
193+
* {@link Viewport} directive such as a `for`, an `if`, or a `switch`.
193194
*
194195
* ```
195196
* @Decorator({ selector: '[my-directive]' })
196197
* class MyDirective {
197-
* constructor(@Children() dependencies:Query<Maker>) {
198+
* constructor(@Query(Marker) dependencies:QueryList<Maker>) {
198199
* }
199200
* }
200201
* ```
201202
*
202-
* This directive would be instantiated with a [Query] which contains `Dependency` 4 and 6. Here, `Dependency` 5 would
203-
* not be included, because it is not a direct child.
203+
* This directive would be instantiated with a {@link QueryList} which contains `Dependency` 4 and 6. Here, `Dependency`
204+
* 5 would not be included, because it is not a direct child.
205+
*
206+
* ### Injecting a live collection of descendant directives
204207
*
205-
* ### Injecting a live collection of direct descendant directives [PENDING IMPLEMENTATION]
208+
* Note: This is will be implemented in later release. ()
206209
*
207210
* Similar to `@Children` above, but also includes the children of the child elements.
208211
*
209212
* ```
210213
* @Decorator({ selector: '[my-directive]' })
211214
* class MyDirective {
212-
* constructor(@Children() dependencies:Query<Maker>) {
215+
* constructor(@QueryDescendents(Marker) dependencies:QueryList<Maker>) {
213216
* }
214217
* }
215218
* ```
@@ -279,7 +282,7 @@ export class Directive extends Injectable {
279282
* - `directiveProperty` specifies the component property where the value is written.
280283
* - `bindingProperty` specifies the DOM property where the value is read from.
281284
*
282-
* You can include [Pipes] when specifying a `bindingProperty` to allow for data transformation and structural
285+
* You can include a {@link Pipe} when specifying a `bindingProperty` to allow for data transformation and structural
283286
* change detection of the value. These pipes will be evaluated in the context of this component.
284287
*
285288
*
@@ -333,7 +336,9 @@ export class Directive extends Injectable {
333336
* You can also use pipes when writing binding definitions for a directive.
334337
*
335338
* For example, we could write a binding that updates the directive on structural changes, rather than on reference
336-
* changes, as normally occurs in change detection. (See: [Pipe] and [keyValueDiff] documentation for more details.)
339+
* changes, as normally occurs in change detection.
340+
*
341+
* See {@link Pipe} and {@link keyValDiff} documentation for more details.
337342
*
338343
* ```
339344
* @Decorator({
@@ -399,7 +404,7 @@ export class Directive extends Injectable {
399404
* When writing a directive event binding, you can also refer to the following local variables:
400405
* - `$event`: Current event object which triggered the event.
401406
* - `$target`: The source of the event. This will be either a DOM element or an Angular directive.
402-
* [TO BE IMPLEMENTED]
407+
* (will be implemented in later release)
403408
*
404409
*
405410
* ## Syntax
@@ -443,7 +448,7 @@ export class Directive extends Injectable {
443448
/**
444449
* Specifies a set of lifecycle hostListeners in which the directive participates.
445450
*
446-
* See: [onChange], [onDestroy], [onAllChangesDone] for details.
451+
* See {@link onChange}, {@link onDestroy}, {@link onAllChangesDone} for details.
447452
*/
448453
lifecycle:List; //List<LifecycleEvent>
449454

@@ -471,9 +476,9 @@ export class Directive extends Injectable {
471476
}
472477

473478
/**
474-
* Returns true if a directive participates in a given [LifecycleEvent].
479+
* Returns true if a directive participates in a given `LifecycleEvent`.
475480
*
476-
* See: [onChange], [onDestroy], [onAllChangesDone] for details.
481+
* See {@link onChange}, {@link onDestroy}, {@link onAllChangesDone} for details.
477482
*/
478483
hasLifecycleHook(hook:string):boolean {
479484
return isPresent(this.lifecycle) ? ListWrapper.contains(this.lifecycle, hook) : false;
@@ -489,11 +494,11 @@ export class Directive extends Injectable {
489494
* When a component is instantiated, Angular
490495
* - creates a shadow DOM for the component.
491496
* - loads the selected template into the shadow DOM.
492-
* - creates a child [Injector] which is configured with the [Component.injectables].
497+
* - creates a child {@link Injector} which is configured with the `injectables` for the {@link Component}.
493498
*
494499
* All template expressions and statements are then evaluated against the component instance.
495500
*
496-
* For details on the `@View` annotation, see [View].
501+
* For details on the `@View` annotation, see {@link View}.
497502
*
498503
* ## Example
499504
*
@@ -530,17 +535,17 @@ export class Component extends Directive {
530535
/**
531536
* Defines the set of injectable objects that are visible to a Component and its children.
532537
*
533-
* The [injectables] defined in the Component annotation allow you to configure a set of bindings for the component's
538+
* The `injectables` defined in the Component annotation allow you to configure a set of bindings for the component's
534539
* injector.
535540
*
536541
* When a component is instantiated, Angular creates a new child Injector, which is configured with the bindings in
537-
* the Component [injectables] annotation. The injectable objects then become available for injection to the component
542+
* the Component `injectables` annotation. The injectable objects then become available for injection to the component
538543
* itself and any of the directives in the component's template, i.e. they are not available to the directives which
539544
* are children in the component's light DOM.
540545
*
541546
*
542-
* The syntax for configuring the [injectables] injectable is identical to [Injector] injectable configuration. See
543-
* [Injector] for additional detail.
547+
* The syntax for configuring the `injectables` injectable is identical to {@link Injector} injectable configuration.
548+
* See {@link Injector} for additional detail.
544549
*
545550
*
546551
* ## Simple Example
@@ -656,7 +661,7 @@ export class Component extends Directive {
656661
*/
657662
export class DynamicComponent extends Directive {
658663
/**
659-
* Same as [Component.injectables].
664+
* Same as `injectables` in the {@link Component}.
660665
*/
661666
// TODO(vsankin): Please extract into AbstractComponent
662667
injectables:any; //List;
@@ -696,10 +701,10 @@ export class DynamicComponent extends Directive {
696701
* (see: http://en.wikipedia.org/wiki/Composition_over_inheritance)
697702
*
698703
* Decorators:
699-
* - are simplest form of [Directive]s.
704+
* - are simplest form of {@link Directive}s.
700705
* - are best used as a composition pattern ()
701706
*
702-
* Decorators differ from [Component]s in that they:
707+
* Decorators differ from {@link Component}s in that they:
703708
* - can have multiple decorators per element
704709
* - do not create their own evaluation context
705710
* - do not have a template (and therefor do not create Shadow DOM)
@@ -788,11 +793,11 @@ export class Decorator extends Directive {
788793
/**
789794
* Directive that controls the instantiation, destruction, and positioning of inline template elements.
790795
*
791-
* A viewport directive uses a [ViewContainer] to instantiate, insert, move, and destroy views at runtime.
792-
* The [ViewContainer] is created as a result of `<template>` element, and represents a location in the current view
796+
* A viewport directive uses a {@link ViewContainer} to instantiate, insert, move, and destroy views at runtime.
797+
* The {@link ViewContainer} is created as a result of `<template>` element, and represents a location in the current view
793798
* where these actions are performed.
794799
*
795-
* Views are always created as children of the current [View], and as siblings of the `<template>` element. Thus a
800+
* Views are always created as children of the current {@link View}, and as siblings of the `<template>` element. Thus a
796801
* directive in a child view cannot inject the viewport directive that created it.
797802
*
798803
* Since viewport directives are common in Angular, and using the full `<template>` element syntax is wordy, Angular
@@ -906,7 +911,7 @@ export class Viewport extends Directive {
906911
//TODO(misko): turn into LifecycleEvent class once we switch to TypeScript;
907912

908913
/**
909-
* Notify a directive whenever a [View] that contains it is destroyed.
914+
* Notify a directive whenever a {@link View} that contains it is destroyed.
910915
*
911916
* ## Example
912917
*

0 commit comments

Comments
 (0)