docs(update): fixes to enums since template updated

This commit is contained in:
Naomi Black 2015-08-03 14:20:38 -07:00
parent 20b627c33a
commit fa9567189f
14 changed files with 69 additions and 639 deletions

View File

@ -1,166 +1,13 @@
p.location-badge. <h1>angular2/annotations/LifecycleEvent</h1>
exported from <a href='../annotations'>angular2/annotations</a> <h2>(enum)</h2>
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> <div>
<p>Lifecycle events are guaranteed to be called in the following order:</p>
:markdown <ul>
Lifecycle events are guaranteed to be called in the following order: <li><code>onChange</code> (optional if any bindings have changed),</li>
- `onChange` (optional if any bindings have changed), <li><code>onInit</code> (optional after the first check only),</li>
- `onInit` (optional after the first check only), <li><code>onCheck</code>,</li>
- `onCheck`, <li><code>onAllChangesDone</code></li>
- `onAllChangesDone` </ul>
.l-main-section
h2 Members
.l-sub-section
h3 onDestroy
:markdown
Notify a directive whenever a <a href='View-var.html'><code>View</code></a> that contains it is destroyed.
```
@Directive({
...,
lifecycle: [LifecycleEvent.onDestroy]
})
class ClassSet {
onDestroy() {
// invoked to notify directive of the containing view destruction.
}
}
```
.l-sub-section
h3 onChange
:markdown
Notify a directive when any of its bindings have changed.
This method is called right after the directive's bindings have been checked,
and before any of its children's bindings have been checked.
It is invoked only if at least one of the directive's bindings has changed.
:
```
@Directive({
selector: '[class-set]',
properties: [
'propA',
'propB'
],
lifecycle: [LifecycleEvent.onChange]
})
class ClassSet {
propA;
propB;
onChange(changes:{[idx: string, PropertyUpdate]}) {
// This will get called after any of the properties have been updated.
if (changes['propA']) {
// if propA was updated
}
if (changes['propA']) {
// if propB was updated
}
}
}
```
.l-sub-section
h3 onCheck
:markdown
Notify a directive when it has been checked.
This method is called right after the directive's bindings have been checked,
and before any of its children's bindings have been checked.
It is invoked every time even when none of the directive's bindings has changed.
:
```
@Directive({
selector: '[class-set]',
lifecycle: [LifecycleEvent.onCheck]
})
class ClassSet {
onCheck() {
}
}
```
.l-sub-section
h3 onInit
:markdown
Notify a directive when it has been checked the first itme.
This method is called right after the directive's bindings have been checked,
and before any of its children's bindings have been checked.
It is invoked only once.
:
```
@Directive({
selector: '[class-set]',
lifecycle: [LifecycleEvent.onInit]
})
class ClassSet {
onInit() {
}
}
```
.l-sub-section
h3 onAllChangesDone
:markdown
Notify a directive when the bindings of all its children have been checked (whether they have
changed or not).
:
```
@Directive({
selector: '[class-set]',
lifecycle: [LifecycleEvent.onAllChangesDone]
})
class ClassSet {
onAllChangesDone() {
}
}
```
</div>

View File

@ -1,11 +1,12 @@
p.location-badge. p.location-badge.
exported from <a href='../annotations'>angular2/annotations</a> exported from <a href='../annotations'>angular2/annotations</a>
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> 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>
:markdown :markdown
Defines lifecycle method [onAllChangesDone ] called when the bindings of all its children have Defines lifecycle method
been changed. <a href='annotations/LifeCycleEvent#onAllChangesDone'>`LifeCycleEvent.onAllChangesDone`</a>
called when the bindings of all its children have been changed.
.l-main-section .l-main-section

View File

@ -4,8 +4,8 @@ p.location-badge.
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> 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>
:markdown :markdown
Defines lifecycle method [onChange] called after all of component's bound Defines lifecycle method <a href='annotations/LifeCycleEvent#onChange'>`LifeCycleEvent.onChange`</a>
properties are updated. called after all of component's bound properties are updated.
.l-main-section .l-main-section

View File

@ -1,10 +1,11 @@
p.location-badge. p.location-badge.
exported from <a href='../annotations'>angular2/annotations</a> exported from <a href='../annotations'>angular2/annotations</a>
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> 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>
:markdown :markdown
Defines lifecycle method [onCheck] called when a directive is being checked. Defines lifecycle method <a href='annotations/LifeCycleEvent#onCheck'>`LifeCycleEvent.onCheck`</a>
called when a directive is being checked.
.l-main-section .l-main-section

View File

@ -1,10 +1,11 @@
p.location-badge. p.location-badge.
exported from <a href='../annotations'>angular2/annotations</a> exported from <a href='../annotations'>angular2/annotations</a>
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> 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>
:markdown :markdown
Defines lifecycle method [onDestroy] called when a directive is being destroyed. Defines lifecycle method <a href='annotations/LifeCycleEvent#onDestroy'>`LifeCycleEvent.onDestroy`</a>
called when a directive is being destroyed.
.l-main-section .l-main-section

View File

@ -1,10 +1,11 @@
p.location-badge. p.location-badge.
exported from <a href='../annotations'>angular2/annotations</a> exported from <a href='../annotations'>angular2/annotations</a>
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> 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>
:markdown :markdown
Defines lifecycle method [onInit] called when a directive is being checked the first time. Defines lifecycle method <a href='annotations/LifeCycleEvent#onInit'>`LifeCycleEvent.onInit`</a>
called when a directive is being checked the first time.
.l-main-section .l-main-section

View File

@ -74,7 +74,7 @@ p.location-badge.
:markdown :markdown
Specifies an inline template for an angular component. Specifies a template URL for an angular component.
NOTE: either `templateUrl` or `template` should be used, but not both. NOTE: either `templateUrl` or `template` should be used, but not both.
@ -89,7 +89,7 @@ p.location-badge.
:markdown :markdown
Specifies a template URL for an angular component. Specifies an inline template for an angular component.
NOTE: either `templateUrl` or `template` should be used, but not both. NOTE: either `templateUrl` or `template` should be used, but not both.

View File

@ -1,50 +1,7 @@
p.location-badge. <h1>angular2/annotations/ViewEncapsulation</h1>
exported from <a href='../annotations'>angular2/annotations</a> <h2>(enum)</h2>
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> <div>
<p>How the template and styles of a view should be encapsulated.</p>
:markdown
How the template and styles of a view should be encapsulated.
.l-main-section
h2 Members
.l-sub-section
h3 EMULATED
:markdown
Emulate scoping of styles by preprocessing the style rules
and adding additional attributes to elements. This is the default.
.l-sub-section
h3 NATIVE
:markdown
Uses the native mechanism of the renderer. For the DOM this means creating a ShadowRoot.
.l-sub-section
h3 NONE
:markdown
Don't scope the template nor the styles.
</div>

View File

@ -1,84 +1,9 @@
p.location-badge. <h1>angular2/http/ReadyStates</h1>
exported from <a href='../http'>angular2/http</a> <h2>(enum)</h2>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.33/modules/angular2/src/http/enums.ts#L55-L68">angular2/src/http/enums.ts (line 55)</a> <div>
<p>All possible states in which a connection can be, based on
:markdown <a href="http://www.w3.org/TR/XMLHttpRequest/#states">States</a> from the <code>XMLHttpRequest</code> spec, but with an
All possible states in which a connection can be, based on additional &quot;CANCELLED&quot; state.</p>
[States](http://www.w3.org/TR/XMLHttpRequest/#states) from the `XMLHttpRequest` spec, but with an
additional "CANCELLED" state.
.l-main-section
h2 Members
.l-sub-section
h3 UNSENT
:markdown
.l-sub-section
h3 OPEN
:markdown
.l-sub-section
h3 HEADERS_RECEIVED
:markdown
.l-sub-section
h3 LOADING
:markdown
.l-sub-section
h3 DONE
:markdown
.l-sub-section
h3 CANCELLED
:markdown
</div>

View File

@ -1,83 +1,8 @@
p.location-badge. <h1>angular2/http/RequestCacheOpts</h1>
exported from <a href='../http'>angular2/http</a> <h2>(enum)</h2>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.33/modules/angular2/src/http/enums.ts#L11-L24">angular2/src/http/enums.ts (line 11)</a> <div>
<p>Acceptable cache option to be associated with a <a href='Request-class.html'><code>Request</code></a>, based on
:markdown <a href="https://fetch.spec.whatwg.org/#requestcache">RequestCache</a> from the Fetch spec.</p>
Acceptable cache option to be associated with a <a href='Request-class.html'><code>Request</code></a>, based on
[RequestCache](https://fetch.spec.whatwg.org/#requestcache) from the Fetch spec.
.l-main-section
h2 Members
.l-sub-section
h3 Default
:markdown
.l-sub-section
h3 NoStore
:markdown
.l-sub-section
h3 Reload
:markdown
.l-sub-section
h3 NoCache
:markdown
.l-sub-section
h3 ForceCache
:markdown
.l-sub-section
h3 OnlyIfCached
:markdown
</div>

View File

@ -1,47 +1,8 @@
p.location-badge. <h1>angular2/http/RequestCredentialsOpts</h1>
exported from <a href='../http'>angular2/http</a> <h2>(enum)</h2>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.33/modules/angular2/src/http/enums.ts#L24-L34">angular2/src/http/enums.ts (line 24)</a> <div>
<p>Acceptable credentials option to be associated with a <a href='Request-class.html'><code>Request</code></a>, based on
:markdown <a href="https://fetch.spec.whatwg.org/#requestcredentials">RequestCredentials</a> from the Fetch spec.</p>
Acceptable credentials option to be associated with a <a href='Request-class.html'><code>Request</code></a>, based on
[RequestCredentials](https://fetch.spec.whatwg.org/#requestcredentials) from the Fetch spec.
.l-main-section
h2 Members
.l-sub-section
h3 Omit
:markdown
.l-sub-section
h3 SameOrigin
:markdown
.l-sub-section
h3 Include
:markdown
</div>

View File

@ -1,94 +1,7 @@
p.location-badge. <h1>angular2/http/RequestMethods</h1>
exported from <a href='../http'>angular2/http</a> <h2>(enum)</h2>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.33/modules/angular2/src/http/enums.ts#L34-L47">angular2/src/http/enums.ts (line 34)</a> <div>
<p>Supported http methods.</p>
:markdown
Supported http methods.
.l-main-section
h2 Members
.l-sub-section
h3 GET
:markdown
.l-sub-section
h3 POST
:markdown
.l-sub-section
h3 PUT
:markdown
.l-sub-section
h3 DELETE
:markdown
.l-sub-section
h3 OPTIONS
:markdown
.l-sub-section
h3 HEAD
:markdown
.l-sub-section
h3 PATCH
:markdown
</div>

View File

@ -1,47 +1,8 @@
p.location-badge. <h1>angular2/http/RequestModesOpts</h1>
exported from <a href='../http'>angular2/http</a> <h2>(enum)</h2>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.33/modules/angular2/src/http/enums.ts#L1-L11">angular2/src/http/enums.ts (line 1)</a> <div>
<p>Acceptable origin modes to be associated with a <a href='Request-class.html'><code>Request</code></a>, based on
:markdown <a href="https://fetch.spec.whatwg.org/#requestmode">RequestMode</a> from the Fetch spec.</p>
Acceptable origin modes to be associated with a <a href='Request-class.html'><code>Request</code></a>, based on
[RequestMode](https://fetch.spec.whatwg.org/#requestmode) from the Fetch spec.
.l-main-section
h2 Members
.l-sub-section
h3 Cors
:markdown
.l-sub-section
h3 NoCors
:markdown
.l-sub-section
h3 SameOrigin
:markdown
</div>

View File

@ -1,71 +1,8 @@
p.location-badge. <h1>angular2/http/ResponseTypes</h1>
exported from <a href='../http'>angular2/http</a> <h2>(enum)</h2>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.33/modules/angular2/src/http/enums.ts#L68-L80">angular2/src/http/enums.ts (line 68)</a> <div>
<p>Acceptable response types to be associated with a <a href='Response-class.html'><code>Response</code></a>, based on
:markdown <a href="https://fetch.spec.whatwg.org/#responsetype">ResponseType</a> from the Fetch spec.</p>
Acceptable response types to be associated with a <a href='Response-class.html'><code>Response</code></a>, based on
[ResponseType](https://fetch.spec.whatwg.org/#responsetype) from the Fetch spec.
.l-main-section
h2 Members
.l-sub-section
h3 Basic
:markdown
.l-sub-section
h3 Cors
:markdown
.l-sub-section
h3 Default
:markdown
.l-sub-section
h3 Error
:markdown
.l-sub-section
h3 Opaque
:markdown
</div>