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

Commit fa95671

Browse files
committed
docs(update): fixes to enums since template updated
1 parent 20b627c commit fa95671

14 files changed

+71
-641
lines changed
Lines changed: 12 additions & 165 deletions
Original file line numberDiff line numberDiff line change
@@ -1,166 +1,13 @@
11

2-
p.location-badge.
3-
exported from <a href='../annotations'>angular2/annotations</a>
4-
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.33/modules/angular2/src/core/annotations_impl/annotations.ts#L900-L1037">angular2/src/core/annotations_impl/annotations.ts (line 900)</a>
5-
6-
:markdown
7-
Lifecycle events are guaranteed to be called in the following order:
8-
- `onChange` (optional if any bindings have changed),
9-
- `onInit` (optional after the first check only),
10-
- `onCheck`,
11-
- `onAllChangesDone`
12-
13-
14-
.l-main-section
15-
h2 Members
16-
.l-sub-section
17-
h3 onDestroy
18-
19-
20-
:markdown
21-
Notify a directive whenever a <a href='View-var.html'><code>View</code></a> that contains it is destroyed.
22-
23-
24-
25-
```
26-
@Directive({
27-
...,
28-
lifecycle: [LifecycleEvent.onDestroy]
29-
})
30-
class ClassSet {
31-
onDestroy() {
32-
// invoked to notify directive of the containing view destruction.
33-
}
34-
}
35-
```
36-
37-
38-
39-
40-
41-
.l-sub-section
42-
h3 onChange
43-
44-
45-
:markdown
46-
Notify a directive when any of its bindings have changed.
47-
48-
This method is called right after the directive's bindings have been checked,
49-
and before any of its children's bindings have been checked.
50-
51-
It is invoked only if at least one of the directive's bindings has changed.
52-
53-
:
54-
55-
```
56-
@Directive({
57-
selector: '[class-set]',
58-
properties: [
59-
'propA',
60-
'propB'
61-
],
62-
lifecycle: [LifecycleEvent.onChange]
63-
})
64-
class ClassSet {
65-
propA;
66-
propB;
67-
onChange(changes:{[idx: string, PropertyUpdate]}) {
68-
// This will get called after any of the properties have been updated.
69-
if (changes['propA']) {
70-
// if propA was updated
71-
}
72-
if (changes['propA']) {
73-
// if propB was updated
74-
}
75-
}
76-
}
77-
```
78-
79-
80-
81-
82-
83-
.l-sub-section
84-
h3 onCheck
85-
86-
87-
:markdown
88-
Notify a directive when it has been checked.
89-
90-
This method is called right after the directive's bindings have been checked,
91-
and before any of its children's bindings have been checked.
92-
93-
It is invoked every time even when none of the directive's bindings has changed.
94-
95-
:
96-
97-
```
98-
@Directive({
99-
selector: '[class-set]',
100-
lifecycle: [LifecycleEvent.onCheck]
101-
})
102-
class ClassSet {
103-
onCheck() {
104-
}
105-
}
106-
```
107-
108-
109-
110-
111-
112-
.l-sub-section
113-
h3 onInit
114-
115-
116-
:markdown
117-
Notify a directive when it has been checked the first itme.
118-
119-
This method is called right after the directive's bindings have been checked,
120-
and before any of its children's bindings have been checked.
121-
122-
It is invoked only once.
123-
124-
:
125-
126-
```
127-
@Directive({
128-
selector: '[class-set]',
129-
lifecycle: [LifecycleEvent.onInit]
130-
})
131-
class ClassSet {
132-
onInit() {
133-
}
134-
}
135-
```
136-
137-
138-
139-
140-
141-
.l-sub-section
142-
h3 onAllChangesDone
143-
144-
145-
:markdown
146-
Notify a directive when the bindings of all its children have been checked (whether they have
147-
changed or not).
148-
149-
:
150-
151-
```
152-
@Directive({
153-
selector: '[class-set]',
154-
lifecycle: [LifecycleEvent.onAllChangesDone]
155-
})
156-
class ClassSet {
157-
158-
onAllChangesDone() {
159-
}
160-
161-
}
162-
```
163-
164-
165-
166-
2+
<h1>angular2/annotations/LifecycleEvent</h1>
3+
<h2>(enum)</h2>
4+
<div>
5+
<p>Lifecycle events are guaranteed to be called in the following order:</p>
6+
<ul>
7+
<li><code>onChange</code> (optional if any bindings have changed),</li>
8+
<li><code>onInit</code> (optional after the first check only),</li>
9+
<li><code>onCheck</code>,</li>
10+
<li><code>onAllChangesDone</code></li>
11+
</ul>
12+
13+
</div>

public/docs/js/latest/api/annotations/OnAllChangesDone-interface.jade

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
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/2.0.0-alpha.33/modules/angular2/src/core/compiler/interfaces.ts#L27-L33">angular2/src/core/compiler/interfaces.ts (line 27)</a>
4+
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.33/modules/angular2/src/core/compiler/interfaces.ts#L30-L37">angular2/src/core/compiler/interfaces.ts (line 30)</a>
55

66
:markdown
7-
Defines lifecycle method [onAllChangesDone ] called when the bindings of all its children have
8-
been changed.
7+
Defines lifecycle method
8+
<a href='annotations/LifeCycleEvent#onAllChangesDone'>`LifeCycleEvent.onAllChangesDone`</a>
9+
called when the bindings of all its children have been changed.
910

1011

1112
.l-main-section

public/docs/js/latest/api/annotations/OnChange-interface.jade

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ p.location-badge.
44
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.33/modules/angular2/src/core/compiler/interfaces.ts#L7-L12">angular2/src/core/compiler/interfaces.ts (line 7)</a>
55

66
:markdown
7-
Defines lifecycle method [onChange] called after all of component's bound
8-
properties are updated.
7+
Defines lifecycle method <a href='https://github.com/annotations/LifeCycleEvent#onChange'>`LifeCycleEvent.onChange`</a>
8+
called after all of component's bound properties are updated.
99

1010

1111
.l-main-section

public/docs/js/latest/api/annotations/OnCheck-interface.jade

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
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/2.0.0-alpha.33/modules/angular2/src/core/compiler/interfaces.ts#L17-L22">angular2/src/core/compiler/interfaces.ts (line 17)</a>
4+
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.33/modules/angular2/src/core/compiler/interfaces.ts#L18-L24">angular2/src/core/compiler/interfaces.ts (line 18)</a>
55

66
:markdown
7-
Defines lifecycle method [onCheck] called when a directive is being checked.
7+
Defines lifecycle method <a href='annotations/LifeCycleEvent#onCheck'>`LifeCycleEvent.onCheck`</a>
8+
called when a directive is being checked.
89

910

1011
.l-main-section

public/docs/js/latest/api/annotations/OnDestroy-interface.jade

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
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/2.0.0-alpha.33/modules/angular2/src/core/compiler/interfaces.ts#L12-L17">angular2/src/core/compiler/interfaces.ts (line 12)</a>
4+
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.33/modules/angular2/src/core/compiler/interfaces.ts#L12-L18">angular2/src/core/compiler/interfaces.ts (line 12)</a>
55

66
:markdown
7-
Defines lifecycle method [onDestroy] called when a directive is being destroyed.
7+
Defines lifecycle method <a href='annotations/LifeCycleEvent#onDestroy'>`LifeCycleEvent.onDestroy`</a>
8+
called when a directive is being destroyed.
89

910

1011
.l-main-section

public/docs/js/latest/api/annotations/OnInit-interface.jade

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
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/2.0.0-alpha.33/modules/angular2/src/core/compiler/interfaces.ts#L22-L27">angular2/src/core/compiler/interfaces.ts (line 22)</a>
4+
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.33/modules/angular2/src/core/compiler/interfaces.ts#L24-L30">angular2/src/core/compiler/interfaces.ts (line 24)</a>
55

66
:markdown
7-
Defines lifecycle method [onInit] called when a directive is being checked the first time.
7+
Defines lifecycle method <a href='annotations/LifeCycleEvent#onInit'>`LifeCycleEvent.onInit`</a>
8+
called when a directive is being checked the first time.
89

910

1011
.l-main-section

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ p.location-badge.
7474

7575

7676
:markdown
77-
Specifies an inline template for an angular component.
77+
Specifies a template URL for an angular component.
7878

7979
NOTE: either `templateUrl` or `template` should be used, but not both.
8080

@@ -89,7 +89,7 @@ p.location-badge.
8989

9090

9191
:markdown
92-
Specifies a template URL for an angular component.
92+
Specifies an inline template for an angular component.
9393

9494
NOTE: either `templateUrl` or `template` should be used, but not both.
9595

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

2-
p.location-badge.
3-
exported from <a href='../annotations'>angular2/annotations</a>
4-
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.33/modules/angular2/src/render/api.ts#L274-L293">angular2/src/render/api.ts (line 274)</a>
5-
6-
:markdown
7-
How the template and styles of a view should be encapsulated.
8-
9-
10-
.l-main-section
11-
h2 Members
12-
.l-sub-section
13-
h3 EMULATED
14-
15-
16-
:markdown
17-
Emulate scoping of styles by preprocessing the style rules
18-
and adding additional attributes to elements. This is the default.
19-
20-
21-
22-
23-
24-
25-
26-
.l-sub-section
27-
h3 NATIVE
28-
29-
30-
:markdown
31-
Uses the native mechanism of the renderer. For the DOM this means creating a ShadowRoot.
32-
33-
34-
35-
36-
37-
38-
39-
.l-sub-section
40-
h3 NONE
41-
42-
43-
:markdown
44-
Don't scope the template nor the styles.
45-
46-
47-
48-
49-
2+
<h1>angular2/annotations/ViewEncapsulation</h1>
3+
<h2>(enum)</h2>
4+
<div>
5+
<p>How the template and styles of a view should be encapsulated.</p>
506

7+
</div>

0 commit comments

Comments
 (0)