Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit b206074

Browse files
committed
docs(api): update for alpha-25
1 parent d62557a commit b206074

20 files changed

+279
-208
lines changed

public/docs/js/latest/api/annotations/ComponentAnnotation-class.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
p.location-badge.
33
exported from <a href='../annotations'>angular2/annotations</a>
4-
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/annotations_impl/annotations.ts#L778-L1011">angular2/src/core/annotations_impl/annotations.ts (line 778)</a>
4+
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/annotations_impl/annotations.ts#L776-L1009">angular2/src/core/annotations_impl/annotations.ts (line 776)</a>
55

66
:markdown
77
Declare reusable UI building blocks for an application.

public/docs/js/latest/api/annotations/DirectiveAnnotation-class.jade

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
p.location-badge.
33
exported from <a href='../annotations'>angular2/annotations</a>
4-
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/annotations_impl/annotations.ts#L4-L778">angular2/src/core/annotations_impl/annotations.ts (line 4)</a>
4+
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/annotations_impl/annotations.ts#L4-L776">angular2/src/core/annotations_impl/annotations.ts (line 4)</a>
55

66
:markdown
77
Directives allow you to attach behavior to elements in the DOM.
@@ -211,11 +211,10 @@ p.location-badge.
211211

212212

213213
A directive can also query for other child directives. Since parent directives are instantiated
214-
before child
215-
directives, a directive can't simply inject the list of child directives. Instead, the directive
216-
injects a <a href='../core/QueryList-class.html'><code>QueryList</code></a>, which updates its contents as children are added, removed, or moved
217-
by a directive
218-
that uses a <a href='../core/ViewContainerRef-class.html'><code>ViewContainerRef</code></a> such as a `for`, an `if`, or a `switch`.
214+
before child directives, a directive can't simply inject the list of child directives. Instead,
215+
the directive injects a <a href='../core/QueryList-class.html'><code>QueryList</code></a>, which updates its contents as children are added,
216+
removed, or moved by a directive that uses a <a href='../core/ViewContainerRef-class.html'><code>ViewContainerRef</code></a> such as a `ng-for`, an
217+
`ng-if`, or an `ng-switch`.
219218

220219
```
221220
@Directive({ selector: '[my-directive]' })
@@ -226,8 +225,7 @@ p.location-badge.
226225
```
227226

228227
This directive would be instantiated with a <a href='../core/QueryList-class.html'><code>QueryList</code></a> which contains `Dependency` 4 and
229-
6. Here, `Dependency`
230-
5 would not be included, because it is not a direct child.
228+
6. Here, `Dependency` 5 would not be included, because it is not a direct child.
231229

232230
### Injecting a live collection of descendant directives
233231

@@ -704,7 +702,8 @@ p.location-badge.
704702

705703
Specifies a set of lifecycle hostListeners in which the directive participates.
706704

707-
See <a href='annotations/onChange'>onChange</a>, <a href='annotations/onDestroy'>onDestroy</a>, <a href='annotations/onAllChangesDone'>onAllChangesDone</a> for details.
705+
See <a href='annotations/onChange'>onChange</a>, <a href='annotations/onDestroy'>onDestroy</a>,
706+
<a href='annotations/onAllChangesDone'>onAllChangesDone</a> for details.
708707

709708

710709

public/docs/js/latest/api/annotations/onAllChangesDone-const.jade

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11

2-
<h1>onAllChangesDone</h1>
3-
<h2>(const)</h2>
4-
<div>
5-
<p>Notify a directive when the bindings of all its children have been changed.</p>
62
.l-main-section
7-
h2 Example:
8-
pre(class="prettyprint linenums")
9-
code.
10-
@Directive({
11-
selector: '[class-set]',
12-
lifecycle: [onAllChangesDone]
13-
})
14-
class ClassSet {
3+
h2 onAllChangesDone <span class="type">variable</span>
4+
p.location-badge.
5+
exported from <a href='../annotations'>angular2/annotations</a>
156

16-
onAllChangesDone() {
17-
}
7+
:markdown
8+
Notify a directive when the bindings of all its children have been changed.
9+
10+
## Example:
11+
12+
```
13+
@Directive({
14+
selector: '[class-set]',
15+
lifecycle: [onAllChangesDone]
16+
})
17+
class ClassSet {
18+
19+
onAllChangesDone() {
20+
}
21+
22+
}
23+
```
1824

19-
}
20-
</div>
Lines changed: 37 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,40 @@
11

2-
<h1>onChange</h1>
3-
<h2>(const)</h2>
4-
<div>
5-
<p>Notify a directive when any of its bindings have changed.</p>
6-
<p>This method is called right after the directive&#39;s bindings have been checked,
7-
and before any of its children&#39;s bindings have been checked.</p>
8-
<p>It is invoked only if at least one of the directive&#39;s bindings has changed.</p>
92
.l-main-section
10-
h2 Example:
11-
pre(class="prettyprint linenums")
12-
code.
13-
@Directive({
14-
selector: '[class-set]',
15-
properties: [
16-
'propA',
17-
'propB'
18-
],
19-
lifecycle: [onChange]
20-
})
21-
class ClassSet {
22-
propA;
23-
propB;
24-
onChange(changes:{[idx: string, PropertyUpdate]}) {
25-
// This will get called after any of the properties have been updated.
26-
if (changes['propA']) {
27-
// if propA was updated
28-
}
29-
if (changes['propA']) {
30-
// if propB was updated
3+
h2 onChange <span class="type">variable</span>
4+
p.location-badge.
5+
exported from <a href='../annotations'>angular2/annotations</a>
6+
7+
:markdown
8+
Notify a directive when any of its bindings have changed.
9+
10+
This method is called right after the directive's bindings have been checked,
11+
and before any of its children's bindings have been checked.
12+
13+
It is invoked only if at least one of the directive's bindings has changed.
14+
15+
## Example:
16+
17+
```
18+
@Directive({
19+
selector: '[class-set]',
20+
properties: [
21+
'propA',
22+
'propB'
23+
],
24+
lifecycle: [onChange]
25+
})
26+
class ClassSet {
27+
propA;
28+
propB;
29+
onChange(changes:{[idx: string, PropertyUpdate]}) {
30+
// This will get called after any of the properties have been updated.
31+
if (changes['propA']) {
32+
// if propA was updated
33+
}
34+
if (changes['propA']) {
35+
// if propB was updated
36+
}
37+
}
3138
}
32-
}
33-
}
34-
</div>
39+
```
40+
Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11

2-
<h1>onCheck</h1>
3-
<h2>(const)</h2>
4-
<div>
5-
<p>Notify a directive when it has been checked.</p>
6-
<p>This method is called right after the directive&#39;s bindings have been checked,
7-
and before any of its children&#39;s bindings have been checked.</p>
8-
<p>It is invoked every time even when none of the directive&#39;s bindings has changed.</p>
92
.l-main-section
10-
h2 Example:
11-
pre(class="prettyprint linenums")
12-
code.
13-
@Directive({
14-
selector: '[class-set]',
15-
lifecycle: [onCheck]
16-
})
17-
class ClassSet {
18-
onCheck() {
19-
}
20-
}
21-
</div>
3+
h2 onCheck <span class="type">variable</span>
4+
p.location-badge.
5+
exported from <a href='../annotations'>angular2/annotations</a>
6+
7+
:markdown
8+
Notify a directive when it has been checked.
9+
10+
This method is called right after the directive's bindings have been checked,
11+
and before any of its children's bindings have been checked.
12+
13+
It is invoked every time even when none of the directive's bindings has changed.
14+
15+
## Example:
16+
17+
```
18+
@Directive({
19+
selector: '[class-set]',
20+
lifecycle: [onCheck]
21+
})
22+
class ClassSet {
23+
onCheck() {
24+
}
25+
}
26+
```
27+
Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11

2-
<h1>onDestroy</h1>
3-
<h2>(const)</h2>
4-
<div>
5-
<p>Notify a directive whenever a <a href='View-var.html'><code>View</code></a> that contains it is destroyed.</p>
62
.l-main-section
7-
h2 Example
8-
pre(class="prettyprint linenums")
9-
code.
10-
@Directive({
11-
...,
12-
lifecycle: [onDestroy]
13-
})
14-
class ClassSet {
15-
onDestroy() {
16-
// invoked to notify directive of the containing view destruction.
17-
}
18-
}
19-
</div>
3+
h2 onDestroy <span class="type">variable</span>
4+
p.location-badge.
5+
exported from <a href='../annotations'>angular2/annotations</a>
6+
7+
:markdown
8+
Notify a directive whenever a <a href='View-var.html'><code>View</code></a> that contains it is destroyed.
9+
10+
## Example
11+
12+
```
13+
@Directive({
14+
...,
15+
lifecycle: [onDestroy]
16+
})
17+
class ClassSet {
18+
onDestroy() {
19+
// invoked to notify directive of the containing view destruction.
20+
}
21+
}
22+
```
23+
Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11

2-
<h1>onInit</h1>
3-
<h2>(const)</h2>
4-
<div>
5-
<p>Notify a directive when it has been checked the first itme.</p>
6-
<p>This method is called right after the directive&#39;s bindings have been checked,
7-
and before any of its children&#39;s bindings have been checked.</p>
8-
<p>It is invoked only once.</p>
92
.l-main-section
10-
h2 Example:
11-
pre(class="prettyprint linenums")
12-
code.
13-
@Directive({
14-
selector: '[class-set]',
15-
lifecycle: [onInit]
16-
})
17-
class ClassSet {
18-
onInit() {
19-
}
20-
}
21-
</div>
3+
h2 onInit <span class="type">variable</span>
4+
p.location-badge.
5+
exported from <a href='../annotations'>angular2/annotations</a>
6+
7+
:markdown
8+
Notify a directive when it has been checked the first itme.
9+
10+
This method is called right after the directive's bindings have been checked,
11+
and before any of its children's bindings have been checked.
12+
13+
It is invoked only once.
14+
15+
## Example:
16+
17+
```
18+
@Directive({
19+
selector: '[class-set]',
20+
lifecycle: [onInit]
21+
})
22+
class ClassSet {
23+
onInit() {
24+
}
25+
}
26+
```
27+

public/docs/js/latest/api/change_detection/CHECKED-const.jade

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11

2-
<h1>CHECKED</h1>
3-
<h2>(const)</h2>
4-
<div>
5-
<p>CHECKED means that the change detector should be skipped until its mode changes to
6-
CHECK_ONCE or CHECK_ALWAYS.</p>
2+
.l-main-section
3+
h2 CHECKED <span class="type">variable</span>
4+
p.location-badge.
5+
exported from <a href='../change_detection'>angular2/change_detection</a>
6+
7+
:markdown
8+
CHECKED means that the change detector should be skipped until its mode changes to
9+
CHECK_ONCE or CHECK_ALWAYS.
10+
11+
712

8-
</div>

public/docs/js/latest/api/change_detection/CHECK_ALWAYS-const.jade

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11

2-
<h1>CHECK_ALWAYS</h1>
3-
<h2>(const)</h2>
4-
<div>
5-
<p>CHECK_ALWAYS means that after calling detectChanges the mode of the change detector
6-
will remain CHECK_ALWAYS.</p>
2+
.l-main-section
3+
h2 CHECK_ALWAYS <span class="type">variable</span>
4+
p.location-badge.
5+
exported from <a href='../change_detection'>angular2/change_detection</a>
6+
7+
:markdown
8+
CHECK_ALWAYS means that after calling detectChanges the mode of the change detector
9+
will remain CHECK_ALWAYS.
10+
11+
712

8-
</div>

public/docs/js/latest/api/change_detection/CHECK_ONCE-const.jade

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11

2-
<h1>CHECK_ONCE</h1>
3-
<h2>(const)</h2>
4-
<div>
5-
<p>CHECK_ONCE means that after calling detectChanges the mode of the change detector
6-
will become CHECKED.</p>
2+
.l-main-section
3+
h2 CHECK_ONCE <span class="type">variable</span>
4+
p.location-badge.
5+
exported from <a href='../change_detection'>angular2/change_detection</a>
6+
7+
:markdown
8+
CHECK_ONCE means that after calling detectChanges the mode of the change detector
9+
will become CHECKED.
10+
11+
712

8-
</div>

public/docs/js/latest/api/change_detection/DEFAULT-const.jade

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11

2-
<h1>DEFAULT</h1>
3-
<h2>(const)</h2>
4-
<div>
5-
<p>DEFAULT means that the change detector&#39;s mode will be set to CHECK_ALWAYS during hydration.</p>
2+
.l-main-section
3+
h2 DEFAULT <span class="type">variable</span>
4+
p.location-badge.
5+
exported from <a href='../change_detection'>angular2/change_detection</a>
6+
7+
:markdown
8+
DEFAULT means that the change detector's mode will be set to CHECK_ALWAYS during hydration.
9+
10+
611

7-
</div>

public/docs/js/latest/api/change_detection/DETACHED-const.jade

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11

2-
<h1>DETACHED</h1>
3-
<h2>(const)</h2>
4-
<div>
5-
<p>DETACHED means that the change detector sub tree is not a part of the main tree and
6-
should be skipped.</p>
2+
.l-main-section
3+
h2 DETACHED <span class="type">variable</span>
4+
p.location-badge.
5+
exported from <a href='../change_detection'>angular2/change_detection</a>
6+
7+
:markdown
8+
DETACHED means that the change detector sub tree is not a part of the main tree and
9+
should be skipped.
10+
11+
712

8-
</div>

0 commit comments

Comments
 (0)