docs(alpha-37): update to alphabetize left-nav and fix earlier doc omissions

This commit is contained in:
Naomi Black 2015-09-16 23:40:23 -07:00
parent 31b68b2aec
commit 7934b8450a
303 changed files with 6742 additions and 4878 deletions

View File

@ -1,14 +1,16 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/exceptions.ts#L28-L56">angular2/src/core/di/exceptions.ts (line 28)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/exceptions.ts#L28-L55">angular2/src/core/di/exceptions.ts (line 28)</a>
:markdown :markdown
Starting point to import all public core APIs. Base class for all errors arising from misconfigured bindings.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -20,10 +22,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 name h3#message message
:markdown :markdown
@ -32,10 +32,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 message h3#keys keys
:markdown :markdown
@ -44,10 +42,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 keys h3#injectors injectors
:markdown :markdown
@ -56,10 +52,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 injectors h3#constructResolvingMessage constructResolvingMessage
:markdown :markdown
@ -68,22 +62,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 constructResolvingMessage h3#addKey addKey
:markdown
.l-sub-section
h3 addKey
pre.prettyprint pre.prettyprint
@ -96,10 +76,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 context h3#context context
:markdown :markdown
@ -107,5 +85,3 @@ p.location-badge.

View File

@ -1,14 +1,16 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/forms/model.ts#L37-L135">angular2/src/core/forms/model.ts (line 37)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/forms/model.ts#L38-L132">angular2/src/core/forms/model.ts (line 38)</a>
:markdown :markdown
Starting point to import all public core APIs. Omitting from external API doc as this is really an abstract internal concept.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -20,10 +22,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 validator h3#validator validator
:markdown :markdown
@ -32,10 +32,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 value h3#value value
:markdown :markdown
@ -44,10 +42,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 status h3#status status
:markdown :markdown
@ -56,10 +52,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 valid h3#valid valid
:markdown :markdown
@ -68,10 +62,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 errors h3#errors errors
:markdown :markdown
@ -80,10 +72,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 pristine h3#pristine pristine
:markdown :markdown
@ -92,10 +82,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 dirty h3#dirty dirty
:markdown :markdown
@ -104,10 +92,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 touched h3#touched touched
:markdown :markdown
@ -116,10 +102,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 untouched h3#untouched untouched
:markdown :markdown
@ -128,10 +112,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 valueChanges h3#valueChanges valueChanges
:markdown :markdown
@ -140,10 +122,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 markAsTouched h3#markAsTouched markAsTouched
pre.prettyprint pre.prettyprint
@ -156,10 +136,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 markAsDirty h3#markAsDirty markAsDirty
pre.prettyprint pre.prettyprint
@ -172,10 +150,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 setParent h3#setParent setParent
pre.prettyprint pre.prettyprint
@ -188,10 +164,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 updateValidity h3#updateValidity updateValidity
pre.prettyprint pre.prettyprint
@ -204,10 +178,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 updateValueAndValidity h3#updateValueAndValidity updateValueAndValidity
pre.prettyprint pre.prettyprint
@ -220,10 +192,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 find h3#find find
pre.prettyprint pre.prettyprint
@ -236,10 +206,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 getError h3#getError getError
pre.prettyprint pre.prettyprint
@ -252,10 +220,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 hasError h3#hasError hasError
pre.prettyprint pre.prettyprint
@ -267,5 +233,3 @@ p.location-badge.

View File

@ -4,11 +4,10 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/forms/directives/abstract_control_directive.ts#L1-L19">angular2/src/core/forms/directives/abstract_control_directive.ts (line 1)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/forms/directives/abstract_control_directive.ts#L1-L19">angular2/src/core/forms/directives/abstract_control_directive.ts (line 1)</a>
:markdown :markdown
Starting point to import all public core APIs.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 control h3#control control
:markdown :markdown
@ -17,10 +16,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 value h3#value value
:markdown :markdown
@ -29,10 +26,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 valid h3#valid valid
:markdown :markdown
@ -41,10 +36,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 errors h3#errors errors
:markdown :markdown
@ -53,10 +46,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 pristine h3#pristine pristine
:markdown :markdown
@ -65,10 +56,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 dirty h3#dirty dirty
:markdown :markdown
@ -77,10 +66,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 touched h3#touched touched
:markdown :markdown
@ -89,10 +76,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 untouched h3#untouched untouched
:markdown :markdown
@ -100,5 +85,3 @@ p.location-badge.

View File

@ -1,24 +0,0 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/interfaces.ts#L124-L142">angular2/src/core/compiler/interfaces.ts (line 124)</a>
:markdown
Starting point to import all public core APIs.
.l-main-section
h2 Members
.l-sub-section
h3 afterContentChecked
pre.prettyprint
code.
afterContentChecked()
:markdown

View File

@ -0,0 +1,35 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/interfaces.ts#L125-L141">angular2/src/core/compiler/interfaces.ts (line 125)</a>
:markdown
Notify a directive when the bindings of all its content children have been checked (whether
they have changed or not).
## Example
```
@Component(...)
class MyComponent implements AfterContentChecked {
afterContentChecked(): void {
}
}
```
.l-main-section
h2 Members
.l-sub-section
h3#afterContentChecked afterContentChecked
pre.prettyprint
code.
afterContentChecked()
:markdown

View File

@ -1,24 +0,0 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/interfaces.ts#L106-L124">angular2/src/core/compiler/interfaces.ts (line 106)</a>
:markdown
Starting point to import all public core APIs.
.l-main-section
h2 Members
.l-sub-section
h3 afterContentInit
pre.prettyprint
code.
afterContentInit()
:markdown

View File

@ -0,0 +1,35 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/interfaces.ts#L109-L125">angular2/src/core/compiler/interfaces.ts (line 109)</a>
:markdown
Notify a directive when the bindings of all its content children have been checked the first
time (whether they have changed or not).
## Example
```
@Component(...)
class MyComponent implements AfterContentInit {
afterContentInit(): void {
}
}
```
.l-main-section
h2 Members
.l-sub-section
h3#afterContentInit afterContentInit
pre.prettyprint
code.
afterContentInit()
:markdown

View File

@ -1,24 +0,0 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/interfaces.ts#L160-L178">angular2/src/core/compiler/interfaces.ts (line 160)</a>
:markdown
Starting point to import all public core APIs.
.l-main-section
h2 Members
.l-sub-section
h3 afterViewChecked
pre.prettyprint
code.
afterViewChecked()
:markdown

View File

@ -0,0 +1,35 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/interfaces.ts#L157-L173">angular2/src/core/compiler/interfaces.ts (line 157)</a>
:markdown
Notify a directive when the bindings of all its view children have been checked (whether they
have changed or not).
## Example
```
@Component(...)
class MyComponent implements AfterViewChecked {
afterViewChecked(): void {
}
}
```
.l-main-section
h2 Members
.l-sub-section
h3#afterViewChecked afterViewChecked
pre.prettyprint
code.
afterViewChecked()
:markdown

View File

@ -1,24 +0,0 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/interfaces.ts#L142-L160">angular2/src/core/compiler/interfaces.ts (line 142)</a>
:markdown
Starting point to import all public core APIs.
.l-main-section
h2 Members
.l-sub-section
h3 afterViewInit
pre.prettyprint
code.
afterViewInit()
:markdown

View File

@ -0,0 +1,35 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/interfaces.ts#L141-L157">angular2/src/core/compiler/interfaces.ts (line 141)</a>
:markdown
Notify a directive when the bindings of all its view children have been checked the first time
(whether they have changed or not).
## Example
```
@Component(...)
class MyComponent implements AfterViewInit {
afterViewInit(): void {
}
}
```
.l-main-section
h2 Members
.l-sub-section
h3#afterViewInit afterViewInit
pre.prettyprint
code.
afterViewInit()
:markdown

View File

@ -4,7 +4,15 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/services/app_root_url.ts#L2-L25">angular2/src/core/services/app_root_url.ts (line 2)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/services/app_root_url.ts#L2-L25">angular2/src/core/services/app_root_url.ts (line 2)</a>
:markdown :markdown
Starting point to import all public core APIs. Specifies app root url for the application.
Used by the <a href='Compiler-interface.html'><code>Compiler</code></a> when resolving HTML and CSS template URLs.
This interface can be overridden by the application developer to create custom behavior.
See <a href='Compiler-interface.html'><code>Compiler</code></a>
.l-main-section .l-main-section
h2 Annotations h2 Annotations
@ -18,7 +26,7 @@ p.location-badge.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -30,10 +38,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 value h3#value value
:markdown :markdown

View File

@ -4,7 +4,11 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/view_manager.ts#L19-L379">angular2/src/core/compiler/view_manager.ts (line 19)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/view_manager.ts#L19-L379">angular2/src/core/compiler/view_manager.ts (line 19)</a>
:markdown :markdown
Starting point to import all public core APIs. Entry point for creating, moving views in the view hierarchy and destroying views.
This manager contains all recursion and delegates to helper methods
in AppViewManagerUtils and the Renderer, so unit tests get simpler.
.l-main-section .l-main-section
h2 Annotations h2 Annotations
@ -18,7 +22,7 @@ p.location-badge.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 getViewContainer h3#getViewContainer getViewContainer
pre.prettyprint pre.prettyprint
@ -35,7 +39,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 getHostElement h3#getHostElement getHostElement
pre.prettyprint pre.prettyprint
@ -52,7 +56,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 getNamedElementInComponentView h3#getNamedElementInComponentView getNamedElementInComponentView
pre.prettyprint pre.prettyprint
@ -75,7 +79,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 getComponent h3#getComponent getComponent
pre.prettyprint pre.prettyprint
@ -95,7 +99,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 createRootHostView h3#createRootHostView createRootHostView
pre.prettyprint pre.prettyprint
@ -163,7 +167,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 destroyRootHostView h3#destroyRootHostView destroyRootHostView
pre.prettyprint pre.prettyprint
@ -180,7 +184,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 createEmbeddedViewInContainer h3#createEmbeddedViewInContainer createEmbeddedViewInContainer
pre.prettyprint pre.prettyprint
@ -197,7 +201,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 createHostViewInContainer h3#createHostViewInContainer createHostViewInContainer
pre.prettyprint pre.prettyprint
@ -214,7 +218,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 destroyViewInContainer h3#destroyViewInContainer destroyViewInContainer
pre.prettyprint pre.prettyprint
@ -231,7 +235,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 attachViewInContainer h3#attachViewInContainer attachViewInContainer
pre.prettyprint pre.prettyprint
@ -248,7 +252,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 detachViewInContainer h3#detachViewInContainer detachViewInContainer
pre.prettyprint pre.prettyprint

View File

@ -1,18 +1,28 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/application_ref.ts#L3-L47">angular2/src/core/application_ref.ts (line 3)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/application_ref.ts#L242-L320">angular2/src/core/application_ref.ts (line 242)</a>
:markdown :markdown
Starting point to import all public core APIs. Represents an Angular application.
Use to retrieve the application <a href='Injector-class.html'><code>Injector</code></a> or to bootstrap new
components at the root of the application. Can also be used to dispose
of the entire application and all its loaded components.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 hostComponentType h3#registerBootstrapListener registerBootstrapListener
pre.prettyprint
code.
registerBootstrapListener(listener: (ref: ComponentRef) =&gt; void)
:markdown :markdown
Returns the current <a href='ComponentMetadata-class.html'><code>ComponentMetadata</code></a> type. Register a listener to be called each time a new root component type is bootstrapped.
@ -21,11 +31,16 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 hostComponent h3#bootstrap bootstrap
pre.prettyprint
code.
bootstrap(componentType: Type, bindings?: Array&lt;Type | Binding | any[]&gt;)
:markdown :markdown
Returns the current <a href='ComponentMetadata-class.html'><code>ComponentMetadata</code></a> instance. Bootstrap a new component at the root level of the application, optionally with
component specific bindings.
@ -34,7 +49,33 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 dispose h3#injector injector
:markdown
Retrieve the application <a href='Injector-class.html'><code>Injector</code></a>.
.l-sub-section
h3#zone zone
:markdown
Retrieve the application <a href='NgZone-interface.html'><code>NgZone</code></a>.
.l-sub-section
h3#dispose dispose
pre.prettyprint pre.prettyprint
@ -42,22 +83,6 @@ p.location-badge.
dispose() dispose()
:markdown :markdown
Dispose (un-load) the application.
.l-sub-section
h3 injector
:markdown
Returns the root application <a href='Injector-class.html'><code>Injector</code></a>.

View File

@ -4,7 +4,31 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/pipes/async_pipe.ts#L35-L133">angular2/src/core/pipes/async_pipe.ts (line 35)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/pipes/async_pipe.ts#L35-L133">angular2/src/core/pipes/async_pipe.ts (line 35)</a>
:markdown :markdown
Starting point to import all public core APIs. The `async` pipe subscribes to an Observable or Promise and returns the latest value it has
emitted.
When a new value is emitted, the `async` pipe marks the component to be checked for changes.
# Example
The example below binds the `time` Observable to the view. Every 500ms, the `time` Observable
updates the view with the current time.
```
import {Observable} from 'angular2/core';
@Component({
selector: "task-cmp"
})
@View({
template: "Time: {{ time | async }}"
})
class Task {
time = new Observable<number>(observer => {
setInterval(_ =>
observer.next(new Date().getTime()), 500);
});
}
```
.l-main-section .l-main-section
h2 Annotations h2 Annotations
@ -25,7 +49,7 @@ p.location-badge.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -37,10 +61,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 onDestroy h3#onDestroy onDestroy
pre.prettyprint pre.prettyprint
@ -53,10 +75,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 transform h3#transform transform
pre.prettyprint pre.prettyprint
@ -68,5 +88,3 @@ p.location-badge.

View File

@ -2,7 +2,7 @@
.l-main-section .l-main-section
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L503-L503">angular2/src/core/metadata.ts (line 503)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L507-L507">angular2/src/core/metadata.ts (line 507)</a>
:markdown :markdown
<a href='AttributeMetadata-class.html'><code>AttributeMetadata</code></a> factory function. <a href='AttributeMetadata-class.html'><code>AttributeMetadata</code></a> factory function.

View File

@ -1,7 +1,52 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L278-L329">angular2/src/core/metadata.ts (line 278)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L282-L333">angular2/src/core/metadata.ts (line 282)</a>
:markdown :markdown
Starting point to import all public core APIs. <a href='AttributeMetadata-class.html'><code>AttributeMetadata</code></a> factory for creating annotations, decorators or DSL.
## Example as TypeScript Decorator
```
import {Attribute, Component, View} from "angular2/angular2";
@Component({...})
@View({...})
class MyComponent {
constructor(@Attribute('title') title: string) {
...
}
}
```
## Example as ES5 DSL
```
var MyComponent = ng
.Component({...})
.View({...})
.Class({
constructor: [new ng.Attribute('title'), function(title) {
...
}]
})
```
## Example as ES5 annotation
```
var MyComponent = function(title) {
...
};
MyComponent.annotations = [
new ng.Component({...}),
new ng.View({...})
]
MyComponent.parameters = [
[new ng.Attribute('title')]
]
```

View File

@ -4,14 +4,39 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata/di.ts#L9-L50">angular2/src/core/metadata/di.ts (line 9)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata/di.ts#L9-L50">angular2/src/core/metadata/di.ts (line 9)</a>
:markdown :markdown
Starting point to import all public core APIs. Specifies that a constant attribute value should be injected.
The directive can inject constant string literals of host element attributes.
## Example
Suppose we have an `<input>` element and want to know its `type`.
```html
<input type="text">
```
A decorator can inject string literal `text` like so:
```javascript
@Directive({
selector: `input'
})
class InputDirective {
constructor(@Attribute('type') type) {
// type would be `text` in this example
}
}
```
.l-main-section .l-main-section
h2 Annotations h2 Annotations
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -23,10 +48,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 attributeName h3#attributeName attributeName
:markdown :markdown
@ -35,10 +58,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 token h3#token token
:markdown :markdown
@ -47,10 +68,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 toString h3#toString toString
pre.prettyprint pre.prettyprint
@ -62,5 +81,3 @@ p.location-badge.

View File

@ -4,14 +4,28 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/binding.ts#L41-L229">angular2/src/core/di/binding.ts (line 41)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/binding.ts#L41-L229">angular2/src/core/di/binding.ts (line 41)</a>
:markdown :markdown
Starting point to import all public core APIs. Describes how_ the <a href='Injector-class.html'><code>Injector</code></a> should instantiate a given token.
See <a href='bind-function.html'><code>bind</code></a>.
## Example
```javascript
var injector = Injector.resolveAndCreate([
new Binding(String, { toValue: 'Hello' })
]);
expect(injector.get(String)).toEqual('Hello');
```
.l-main-section .l-main-section
h2 Annotations h2 Annotations
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -30,10 +44,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 token h3#token token
:markdown :markdown
@ -46,7 +58,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 toClass h3#toClass toClass
:markdown :markdown
@ -87,7 +99,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 toValue h3#toValue toValue
:markdown :markdown
@ -110,7 +122,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 toAlias h3#toAlias toAlias
:markdown :markdown
@ -153,7 +165,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 toFactory h3#toFactory toFactory
:markdown :markdown
@ -179,7 +191,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 dependencies h3#dependencies dependencies
:markdown :markdown
@ -206,7 +218,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 multi h3#multi multi
:markdown :markdown

View File

@ -4,11 +4,13 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/binding.ts#L305-L419">angular2/src/core/di/binding.ts (line 305)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/binding.ts#L305-L419">angular2/src/core/di/binding.ts (line 305)</a>
:markdown :markdown
Starting point to import all public core APIs. Helper class for the <a href='bind-function.html'><code>bind</code></a> function.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -20,10 +22,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 token h3#token token
:markdown :markdown
@ -32,10 +32,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 toClass h3#toClass toClass
pre.prettyprint pre.prettyprint
@ -79,7 +77,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 toValue h3#toValue toValue
pre.prettyprint pre.prettyprint
@ -106,7 +104,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 toAlias h3#toAlias toAlias
pre.prettyprint pre.prettyprint
@ -154,7 +152,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 toFactory h3#toFactory toFactory
pre.prettyprint pre.prettyprint

View File

@ -4,11 +4,10 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/injector.ts#L381-L387">angular2/src/core/di/injector.ts (line 381)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/injector.ts#L381-L387">angular2/src/core/di/injector.ts (line 381)</a>
:markdown :markdown
Starting point to import all public core APIs.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -20,10 +19,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 binding h3#binding binding
:markdown :markdown
@ -32,10 +29,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 visibility h3#visibility visibility
:markdown :markdown
@ -44,10 +39,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 getKeyId h3#getKeyId getKeyId
pre.prettyprint pre.prettyprint
@ -59,5 +52,3 @@ p.location-badge.

View File

@ -4,4 +4,3 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/debug/debug_element.ts#L184-L199">angular2/src/core/debug/debug_element.ts (line 184)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/debug/debug_element.ts#L184-L199">angular2/src/core/debug/debug_element.ts (line 184)</a>
:markdown :markdown
Starting point to import all public core APIs.

View File

@ -2,7 +2,7 @@
.l-main-section .l-main-section
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/directives.ts#L63-L64">angular2/src/core/directives.ts (line 63)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/directives.ts#L64-L65">angular2/src/core/directives.ts (line 64)</a>
:markdown :markdown
A collection of the Angular core directives that are likely to be used in each and every Angular A collection of the Angular core directives that are likely to be used in each and every Angular

View File

@ -4,11 +4,15 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/change_detection/exceptions.ts#L17-L34">angular2/src/core/change_detection/exceptions.ts (line 17)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/change_detection/exceptions.ts#L17-L34">angular2/src/core/change_detection/exceptions.ts (line 17)</a>
:markdown :markdown
Starting point to import all public core APIs. Thrown when an expression evaluation raises an exception.
This error wraps the original exception, this is done to attach expression location information.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -20,10 +24,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 location h3#location location
:markdown :markdown

View File

@ -4,11 +4,10 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/change_detection/constants.ts#L8-L49">angular2/src/core/change_detection/constants.ts (line 8)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/change_detection/constants.ts#L8-L49">angular2/src/core/change_detection/constants.ts (line 8)</a>
:markdown :markdown
Starting point to import all public core APIs.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 CheckOnce h3#CheckOnce CheckOnce
:markdown :markdown
@ -22,7 +21,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 Checked h3#Checked Checked
:markdown :markdown
@ -36,7 +35,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 CheckAlways h3#CheckAlways CheckAlways
:markdown :markdown
@ -50,7 +49,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 Detached h3#Detached Detached
:markdown :markdown
@ -64,7 +63,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 OnPush h3#OnPush OnPush
:markdown :markdown
@ -77,7 +76,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 Default h3#Default Default
:markdown :markdown
@ -90,7 +89,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 OnPushObserve h3#OnPushObserve OnPushObserve
:markdown :markdown

View File

@ -4,11 +4,10 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/change_detection/interfaces.ts#L55-L74">angular2/src/core/change_detection/interfaces.ts (line 55)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/change_detection/interfaces.ts#L55-L74">angular2/src/core/change_detection/interfaces.ts (line 55)</a>
:markdown :markdown
Starting point to import all public core APIs.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 parent h3#parent parent
:markdown :markdown
@ -17,10 +16,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 mode h3#mode mode
:markdown :markdown
@ -29,10 +26,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 ref h3#ref ref
:markdown :markdown
@ -41,10 +36,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 addChild h3#addChild addChild
pre.prettyprint pre.prettyprint
@ -57,10 +50,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 addShadowDomChild h3#addShadowDomChild addShadowDomChild
pre.prettyprint pre.prettyprint
@ -73,10 +64,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 removeChild h3#removeChild removeChild
pre.prettyprint pre.prettyprint
@ -89,10 +78,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 removeShadowDomChild h3#removeShadowDomChild removeShadowDomChild
pre.prettyprint pre.prettyprint
@ -105,10 +92,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 remove h3#remove remove
pre.prettyprint pre.prettyprint
@ -121,10 +106,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 hydrate h3#hydrate hydrate
pre.prettyprint pre.prettyprint
@ -137,10 +120,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 dehydrate h3#dehydrate dehydrate
pre.prettyprint pre.prettyprint
@ -153,10 +134,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 markPathToRootAsCheckOnce h3#markPathToRootAsCheckOnce markPathToRootAsCheckOnce
pre.prettyprint pre.prettyprint
@ -169,10 +148,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 handleEvent h3#handleEvent handleEvent
pre.prettyprint pre.prettyprint
@ -185,10 +162,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 detectChanges h3#detectChanges detectChanges
pre.prettyprint pre.prettyprint
@ -201,10 +176,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 checkNoChanges h3#checkNoChanges checkNoChanges
pre.prettyprint pre.prettyprint
@ -216,5 +189,3 @@ p.location-badge.

View File

@ -1,14 +1,19 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/change_detection/change_detector_ref.ts#L2-L38">angular2/src/core/change_detection/change_detector_ref.ts (line 2)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/change_detection/change_detector_ref.ts#L2-L40">angular2/src/core/change_detection/change_detector_ref.ts (line 2)</a>
:markdown :markdown
Starting point to import all public core APIs. Controls change detection.
<a href='ChangeDetectorRef-interface.html'><code>ChangeDetectorRef</code></a> allows requesting checks for detectors that rely on observables. It
also allows detaching and attaching change detector subtrees.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 markForCheck h3#markForCheck markForCheck
pre.prettyprint pre.prettyprint
@ -25,7 +30,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 detach h3#detach detach
pre.prettyprint pre.prettyprint
@ -44,7 +49,21 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 reattach h3#detectChanges detectChanges
pre.prettyprint
code.
detectChanges()
:markdown
.l-sub-section
h3#reattach reattach
pre.prettyprint pre.prettyprint

View File

@ -4,7 +4,14 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/forms/directives/checkbox_value_accessor.ts#L9-L66">angular2/src/core/forms/directives/checkbox_value_accessor.ts (line 9)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/forms/directives/checkbox_value_accessor.ts#L9-L66">angular2/src/core/forms/directives/checkbox_value_accessor.ts (line 9)</a>
:markdown :markdown
Starting point to import all public core APIs. The accessor for writing a value and listening to changes on a checkbox input element.
# Example
```
<input type="checkbox" [ng-control]="rememberLogin">
```
.l-main-section .l-main-section
h2 Annotations h2 Annotations
@ -31,7 +38,7 @@ p.location-badge.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -43,10 +50,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 onChange h3#onChange onChange
:markdown :markdown
@ -55,10 +60,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 onTouched h3#onTouched onTouched
:markdown :markdown
@ -67,10 +70,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 writeValue h3#writeValue writeValue
pre.prettyprint pre.prettyprint
@ -83,10 +84,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 ngClassUntouched h3#ngClassUntouched ngClassUntouched
:markdown :markdown
@ -95,10 +94,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 ngClassTouched h3#ngClassTouched ngClassTouched
:markdown :markdown
@ -107,10 +104,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 ngClassPristine h3#ngClassPristine ngClassPristine
:markdown :markdown
@ -119,10 +114,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 ngClassDirty h3#ngClassDirty ngClassDirty
:markdown :markdown
@ -131,10 +124,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 ngClassValid h3#ngClassValid ngClassValid
:markdown :markdown
@ -143,10 +134,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 ngClassInvalid h3#ngClassInvalid ngClassInvalid
:markdown :markdown
@ -155,10 +144,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 registerOnChange h3#registerOnChange registerOnChange
pre.prettyprint pre.prettyprint
@ -171,10 +158,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 registerOnTouched h3#registerOnTouched registerOnTouched
pre.prettyprint pre.prettyprint
@ -186,5 +171,3 @@ p.location-badge.

View File

@ -4,11 +4,13 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/util/decorators.ts#L1-L22">angular2/src/core/util/decorators.ts (line 1)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/util/decorators.ts#L1-L22">angular2/src/core/util/decorators.ts (line 1)</a>
:markdown :markdown
Starting point to import all public core APIs. Declares the interface to be used with <a href='Class-function.html'><code>Class</code></a>.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 extends? h3#extends extends?
:markdown :markdown
@ -21,7 +23,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
:markdown :markdown

View File

@ -4,7 +4,26 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/compiler.ts#L71-L361">angular2/src/core/compiler/compiler.ts (line 71)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/compiler.ts#L71-L361">angular2/src/core/compiler/compiler.ts (line 71)</a>
:markdown :markdown
Starting point to import all public core APIs. ## URL Resolution
```
var appRootUrl: AppRootUrl = ...;
var componentUrlMapper: ComponentUrlMapper = ...;
var urlResolver: UrlResolver = ...;
var componentType: Type = ...;
var componentAnnotation: ComponentAnnotation = ...;
var viewAnnotation: ViewAnnotation = ...;
// Resolving a URL
var url = viewAnnotation.templateUrl;
var componentUrl = componentUrlMapper.getUrl(componentType);
var componentResolvedUrl = urlResolver.resolve(appRootUrl.value, componentUrl);
var templateResolvedUrl = urlResolver.resolve(componetResolvedUrl, url);
```
.l-main-section .l-main-section
h2 Annotations h2 Annotations
@ -18,7 +37,7 @@ p.location-badge.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 compileInHost h3#compileInHost compileInHost
pre.prettyprint pre.prettyprint
@ -30,5 +49,3 @@ p.location-badge.

View File

@ -2,7 +2,7 @@
.l-main-section .l-main-section
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L487-L488">angular2/src/core/metadata.ts (line 487)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L491-L492">angular2/src/core/metadata.ts (line 491)</a>
:markdown :markdown
<a href='ComponentMetadata-class.html'><code>ComponentMetadata</code></a> factory function. <a href='ComponentMetadata-class.html'><code>ComponentMetadata</code></a> factory function.

View File

@ -4,11 +4,15 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L57-L77">angular2/src/core/metadata.ts (line 57)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L57-L77">angular2/src/core/metadata.ts (line 57)</a>
:markdown :markdown
Starting point to import all public core APIs. Interface for the <a href='ComponentMetadata-class.html'><code>ComponentMetadata</code></a> decorator function.
See <a href='ComponentFactory-interface.html'><code>ComponentFactory</code></a>.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 View h3#View View
pre.prettyprint pre.prettyprint

View File

@ -1,7 +1,49 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L148-L216">angular2/src/core/metadata.ts (line 148)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L148-L220">angular2/src/core/metadata.ts (line 148)</a>
:markdown :markdown
Starting point to import all public core APIs. <a href='ComponentMetadata-class.html'><code>ComponentMetadata</code></a> factory for creating annotations, decorators or DSL.
## Example as TypeScript Decorator
```
import {Component, View} from "angular2/angular2";
@Component({...})
@View({...})
class MyComponent {
constructor() {
...
}
}
```
## Example as ES5 DSL
```
var MyComponent = ng
.Component({...})
.View({...})
.Class({
constructor: function() {
...
}
})
```
## Example as ES5 annotation
```
var MyComponent = function() {
...
};
MyComponent.annotations = [
new ng.Component({...}),
new ng.View({...})
]
```

View File

@ -1,29 +1,72 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata/directives.ts#L722-L845">angular2/src/core/metadata/directives.ts (line 722)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata/directives.ts#L745-L903">angular2/src/core/metadata/directives.ts (line 745)</a>
:markdown :markdown
Starting point to import all public core APIs. Declare reusable UI building blocks for an application.
Each Angular component requires a single `@Component` and at least one `@View` annotation. The
`@Component`
annotation specifies when a component is instantiated, and which properties and hostListeners it
binds to.
When a component is instantiated, Angular
- creates a shadow DOM for the component.
- loads the selected template into the shadow DOM.
- creates all the injectable objects configured with `bindings` and `viewBindings`.
All template expressions and statements are then evaluated against the component instance.
For details on the `@View` annotation, see <a href='ViewMetadata-class.html'><code>ViewMetadata</code></a>.
## Lifecycle hooks
When the component class implements some <a href='../lifecycle_hooks'><code>undefined</code></a> the callbacks are
called by the change detection at defined points in time during the life of the component.
## Example
```
@Component({
selector: 'greet'
})
@View({
template: 'Hello {{name}}!'
})
class Greet {
name: string;
constructor() {
this.name = 'World';
}
}
```
.l-main-section .l-main-section
h2 Annotations h2 Annotations
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
code. code.
constructor({selector, properties, events, host, exportAs, bindings, viewBindings, constructor({selector, properties, events, host, dynamicLoadable, compiledHostTemplate, exportAs,
changeDetection = ChangeDetectionStrategy.Default, compileChildren = true}?: { moduleId, bindings, viewBindings, changeDetection = ChangeDetectionStrategy.Default,
compileChildren = true}?: {
selector?: string, selector?: string,
properties?: string[], properties?: string[],
events?: string[], events?: string[],
host?: StringMap&lt;string, string&gt;, host?: StringMap&lt;string, string&gt;,
dynamicLoadable?: boolean,
compiledHostTemplate?: any,
bindings?: any[], bindings?: any[],
exportAs?: string, exportAs?: string,
moduleId?: string,
compileChildren?: boolean, compileChildren?: boolean,
viewBindings?: any[], viewBindings?: any[],
changeDetection?: ChangeDetectionStrategy, changeDetection?: ChangeDetectionStrategy,
@ -34,10 +77,51 @@ p.location-badge.
.l-sub-section
h3#dynamicLoadable dynamicLoadable
:markdown
Declare that this component can be programatically loaded.
Every component that is used in bootstrap, routing, ... has to be
annotated with this.
```
@Component({
selector: 'root',
dynamicLoadable: true
})
@View({
template: 'hello world!'
})
class RootComponent {
}
```
.l-sub-section .l-sub-section
h3 changeDetection h3#compiledHostTemplate compiledHostTemplate
:markdown
Used by build tools to store the compiled template.
Not intended to be used by a user.
.l-sub-section
h3#changeDetection changeDetection
:markdown :markdown
@ -56,11 +140,11 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 viewBindings h3#viewBindings viewBindings
:markdown :markdown
Defines the set of injectable objects that are visible to its view dom children. Defines the set of injectable objects that are visible to its view DOM children.
## Simple Example ## Simple Example

View File

@ -1,14 +1,18 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/dynamic_component_loader.ts#L7-L42">angular2/src/core/compiler/dynamic_component_loader.ts (line 7)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/dynamic_component_loader.ts#L11-L58">angular2/src/core/compiler/dynamic_component_loader.ts (line 11)</a>
:markdown :markdown
Starting point to import all public core APIs. Angular's reference to a component instance.
`ComponentRef` represents a component instance lifecycle and meta information.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 location h3#location location
:markdown :markdown
@ -21,7 +25,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 instance h3#instance instance
:markdown :markdown
@ -34,7 +38,27 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 hostView h3#componentType componentType
:markdown
.l-sub-section
h3#injector injector
:markdown
.l-sub-section
h3#hostView hostView
:markdown :markdown
@ -47,7 +71,27 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 dispose h3#hostComponentType hostComponentType
:markdown
.l-sub-section
h3#hostComponent hostComponent
:markdown
.l-sub-section
h3#dispose dispose
pre.prettyprint pre.prettyprint

View File

@ -4,7 +4,13 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/component_url_mapper.ts#L4-L24">angular2/src/core/compiler/component_url_mapper.ts (line 4)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/component_url_mapper.ts#L4-L24">angular2/src/core/compiler/component_url_mapper.ts (line 4)</a>
:markdown :markdown
Starting point to import all public core APIs. Resolve a `Type` from a <a href='ComponentMetadata-class.html'><code>ComponentMetadata</code></a> into a URL.
This interface can be overridden by the application developer to create custom behavior.
See <a href='Compiler-interface.html'><code>Compiler</code></a>
.l-main-section .l-main-section
h2 Annotations h2 Annotations
@ -18,7 +24,7 @@ p.location-badge.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 getUrl h3#getUrl getUrl
pre.prettyprint pre.prettyprint

View File

@ -1,14 +1,19 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/forms/model.ts#L135-L165">angular2/src/core/forms/model.ts (line 135)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/forms/model.ts#L132-L161">angular2/src/core/forms/model.ts (line 132)</a>
:markdown :markdown
Starting point to import all public core APIs. Defines a part of a form that cannot be divided into other controls.
`Control` is one of the three fundamental building blocks used to define forms in Angular, along
with <a href='ControlGroup-class.html'><code>ControlGroup</code></a> and <a href='ControlArray-class.html'><code>ControlArray</code></a>.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -20,10 +25,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 updateValue h3#updateValue updateValue
pre.prettyprint pre.prettyprint
@ -37,10 +40,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 registerOnChange h3#registerOnChange registerOnChange
pre.prettyprint pre.prettyprint
@ -52,5 +53,3 @@ p.location-badge.

View File

@ -1,14 +1,24 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/forms/model.ts#L249-L304">angular2/src/core/forms/model.ts (line 249)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/forms/model.ts#L238-L288">angular2/src/core/forms/model.ts (line 238)</a>
:markdown :markdown
Starting point to import all public core APIs. Defines a part of a form, of variable length, that can contain other controls.
A `ControlArray` aggregates the values and errors of each <a href='Control-class.html'><code>Control</code></a> in the group. Thus, if
one of the controls in a group is invalid, the entire group is invalid. Similarly, if a control
changes its value, the entire group changes as well.
`ControlArray` is one of the three fundamental building blocks used to define forms in Angular,
along with <a href='Control-class.html'><code>Control</code></a> and <a href='ControlGroup-class.html'><code>ControlGroup</code></a>. <a href='ControlGroup-class.html'><code>ControlGroup</code></a> can also contain
other controls, but is of fixed length.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -20,10 +30,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 controls h3#controls controls
:markdown :markdown
@ -32,10 +40,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 at h3#at at
pre.prettyprint pre.prettyprint
@ -48,10 +54,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 push h3#push push
pre.prettyprint pre.prettyprint
@ -64,10 +68,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 insert h3#insert insert
pre.prettyprint pre.prettyprint
@ -80,10 +82,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 removeAt h3#removeAt removeAt
pre.prettyprint pre.prettyprint
@ -96,10 +96,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 length h3#length length
:markdown :markdown
@ -107,5 +105,3 @@ p.location-badge.

View File

@ -4,11 +4,15 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/forms/directives/control_container.ts#L2-L13">angular2/src/core/forms/directives/control_container.ts (line 2)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/forms/directives/control_container.ts#L2-L13">angular2/src/core/forms/directives/control_container.ts (line 2)</a>
:markdown :markdown
Starting point to import all public core APIs. A directive that contains multiple <a href='NgControl-class.html'><code>NgControl</code></a>.
Only used by the forms module.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 name h3#name name
:markdown :markdown
@ -17,10 +21,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 formDirective h3#formDirective formDirective
:markdown :markdown
@ -29,10 +31,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 path h3#path path
:markdown :markdown
@ -40,5 +40,3 @@ p.location-badge.

View File

@ -1,14 +1,24 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/forms/model.ts#L165-L249">angular2/src/core/forms/model.ts (line 165)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/forms/model.ts#L161-L238">angular2/src/core/forms/model.ts (line 161)</a>
:markdown :markdown
Starting point to import all public core APIs. Defines a part of a form, of fixed length, that can contain other controls.
A `ControlGroup` aggregates the values and errors of each <a href='Control-class.html'><code>Control</code></a> in the group. Thus, if
one of the controls in a group is invalid, the entire group is invalid. Similarly, if a control
changes its value, the entire group changes as well.
`ControlGroup` is one of the three fundamental building blocks used to define forms in Angular,
along with <a href='Control-class.html'><code>Control</code></a> and <a href='ControlArray-class.html'><code>ControlArray</code></a>. <a href='ControlArray-class.html'><code>ControlArray</code></a> can also contain other
controls, but is of variable length.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -20,10 +30,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 controls h3#controls controls
:markdown :markdown
@ -32,15 +40,13 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 addControl h3#addControl addControl
pre.prettyprint pre.prettyprint
code. code.
addControl(name: string, c: AbstractControl) addControl(name: string, control: AbstractControl)
:markdown :markdown
@ -48,10 +54,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 removeControl h3#removeControl removeControl
pre.prettyprint pre.prettyprint
@ -64,10 +68,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 include h3#include include
pre.prettyprint pre.prettyprint
@ -80,10 +82,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 exclude h3#exclude exclude
pre.prettyprint pre.prettyprint
@ -96,10 +96,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 contains h3#contains contains
pre.prettyprint pre.prettyprint
@ -111,5 +109,3 @@ p.location-badge.

View File

@ -4,11 +4,15 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/forms/directives/control_value_accessor.ts#L1-L10">angular2/src/core/forms/directives/control_value_accessor.ts (line 1)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/forms/directives/control_value_accessor.ts#L1-L10">angular2/src/core/forms/directives/control_value_accessor.ts (line 1)</a>
:markdown :markdown
Starting point to import all public core APIs. A bridge between a control and a native element.
Please see <a href='DefaultValueAccessor-class.html'><code>DefaultValueAccessor</code></a> for more information.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 writeValue h3#writeValue writeValue
pre.prettyprint pre.prettyprint
@ -21,10 +25,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 registerOnChange h3#registerOnChange registerOnChange
pre.prettyprint pre.prettyprint
@ -37,10 +39,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 registerOnTouched h3#registerOnTouched registerOnTouched
pre.prettyprint pre.prettyprint
@ -52,5 +52,3 @@ p.location-badge.

View File

@ -4,7 +4,22 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/pipes/number_pipe.ts#L116-L145">angular2/src/core/pipes/number_pipe.ts (line 116)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/pipes/number_pipe.ts#L116-L145">angular2/src/core/pipes/number_pipe.ts (line 116)</a>
:markdown :markdown
Starting point to import all public core APIs. WARNING: this pipe uses the Internationalization API.
Therefore it is only reliable in Chrome and Opera browsers.
Formats a number as local currency.
# Usage
expression | currency[:currencyCode[:symbolDisplay[:digitInfo]]]
where `currencyCode` is the ISO 4217 currency code, such as "USD" for the US dollar and
"EUR" for the euro. `symbolDisplay` is a boolean indicating whether to use the currency
symbol (e.g. $) or the currency code (e.g. USD) in the output. The default for this value
is `false`.
For more information about `digitInfo` see <a href='DecimalPipe-class.html'><code>DecimalPipe</code></a>
.l-main-section .l-main-section
h2 Annotations h2 Annotations
@ -25,7 +40,7 @@ p.location-badge.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 transform h3#transform transform
pre.prettyprint pre.prettyprint
@ -37,5 +52,3 @@ p.location-badge.

View File

@ -1,14 +1,29 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/exceptions.ts#L69-L93">angular2/src/core/di/exceptions.ts (line 69)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/exceptions.ts#L68-L92">angular2/src/core/di/exceptions.ts (line 68)</a>
:markdown :markdown
Starting point to import all public core APIs. Thrown when dependencies form a cycle.
## Example:
```javascript
class A {
constructor(b:B) {}
}
class B {
constructor(a:A) {}
}
```
Retrieving `A` or `B` throws a `CyclicDependencyError` as the graph above cannot be constructed.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -19,5 +34,3 @@ p.location-badge.

View File

@ -6,5 +6,3 @@
:markdown :markdown

View File

@ -6,5 +6,3 @@
:markdown :markdown

View File

@ -6,5 +6,3 @@
:markdown :markdown

View File

@ -4,7 +4,63 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/pipes/date_pipe.ts#L21-L114">angular2/src/core/pipes/date_pipe.ts (line 21)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/pipes/date_pipe.ts#L21-L114">angular2/src/core/pipes/date_pipe.ts (line 21)</a>
:markdown :markdown
Starting point to import all public core APIs. WARNING: this pipe uses the Internationalization API.
Therefore it is only reliable in Chrome and Opera browsers.
Formats a date value to a string based on the requested format.
# Usage
expression | date[:format]
where `expression` is a date object or a number (milliseconds since UTC epoch) and
`format` indicates which date/time components to include:
| Component | Symbol | Short Form | Long Form | Numeric | 2-digit |
|-----------|:------:|--------------|-------------------|-----------|-----------|
| era | G | G (AD) | GGGG (Anno Domini)| - | - |
| year | y | - | - | y (2015) | yy (15) |
| month | M | MMM (Sep) | MMMM (September) | M (9) | MM (09) |
| day | d | - | - | d (3) | dd (03) |
| weekday | E | EEE (Sun) | EEEE (Sunday) | - | - |
| hour | j | - | - | j (13) | jj (13) |
| hour12 | h | - | - | h (1 PM) | hh (01 PM)|
| hour24 | H | - | - | H (13) | HH (13) |
| minute | m | - | - | m (5) | mm (05) |
| second | s | - | - | s (9) | ss (09) |
| timezone | z | - | z (Pacific Standard Time)| - | - |
| timezone | Z | Z (GMT-8:00) | - | - | - |
In javascript, only the components specified will be respected (not the ordering,
punctuations, ...) and details of the the formatting will be dependent on the locale.
On the other hand in Dart version, you can also include quoted text as well as some extra
date/time components such as quarter. For more information see:
https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/intl/intl.DateFormat.
`format` can also be one of the following predefined formats:
- `'medium'`: equivalent to `'yMMMdjms'` (e.g. Sep 3, 2010, 12:05:08 PM for en-US)
- `'short'`: equivalent to `'yMdjm'` (e.g. 9/3/2010, 12:05 PM for en-US)
- `'fullDate'`: equivalent to `'yMMMMEEEEd'` (e.g. Friday, September 3, 2010 for en-US)
- `'longDate'`: equivalent to `'yMMMMd'` (e.g. September 3, 2010)
- `'mediumDate'`: equivalent to `'yMMMd'` (e.g. Sep 3, 2010 for en-US)
- `'shortDate'`: equivalent to `'yMd'` (e.g. 9/3/2010 for en-US)
- `'mediumTime'`: equivalent to `'jms'` (e.g. 12:05:08 PM for en-US)
- `'shortTime'`: equivalent to `'jm'` (e.g. 12:05 PM for en-US)
Timezone of the formatted text will be the local system timezone of the end-users machine.
# Examples
Assuming `dateObj` is (year: 2015, month: 6, day: 15, hour: 21, minute: 43, second: 11)
in the _local_ time and locale is 'en-US':
{{ dateObj | date }} // output is 'Jun 15, 2015'
{{ dateObj | date:'medium' }} // output is 'Jun 15, 2015, 9:43:11 PM'
{{ dateObj | date:'shortTime' }} // output is '9:43 PM'
{{ dateObj | date:'mmss' }} // output is '43:11'
.l-main-section .l-main-section
h2 Annotations h2 Annotations
@ -25,7 +81,7 @@ p.location-badge.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 transform h3#transform transform
pre.prettyprint pre.prettyprint
@ -38,10 +94,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 supports h3#supports supports
pre.prettyprint pre.prettyprint
@ -53,5 +107,3 @@ p.location-badge.

View File

@ -4,11 +4,15 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/debug/debug_element.ts#L9-L137">angular2/src/core/debug/debug_element.ts (line 9)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/debug/debug_element.ts#L9-L137">angular2/src/core/debug/debug_element.ts (line 9)</a>
:markdown :markdown
Starting point to import all public core APIs. A DebugElement contains information from the Angular compiler about an
element and provides access to the corresponding ElementInjector and
underlying dom Element, as well as a way to query for children.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 componentInstance h3#componentInstance componentInstance
:markdown :markdown
@ -17,10 +21,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 nativeElement h3#nativeElement nativeElement
:markdown :markdown
@ -29,10 +31,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 elementRef h3#elementRef elementRef
:markdown :markdown
@ -41,10 +41,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 getDirectiveInstance h3#getDirectiveInstance getDirectiveInstance
pre.prettyprint pre.prettyprint
@ -57,10 +55,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 children h3#children children
:markdown :markdown
@ -72,7 +68,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 componentViewChildren h3#componentViewChildren componentViewChildren
:markdown :markdown
@ -85,7 +81,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 triggerEventHandler h3#triggerEventHandler triggerEventHandler
pre.prettyprint pre.prettyprint
@ -98,10 +94,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 hasDirective h3#hasDirective hasDirective
pre.prettyprint pre.prettyprint
@ -114,10 +108,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 inject h3#inject inject
pre.prettyprint pre.prettyprint
@ -130,10 +122,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 getLocal h3#getLocal getLocal
pre.prettyprint pre.prettyprint
@ -146,10 +136,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 query h3#query query
pre.prettyprint pre.prettyprint
@ -166,7 +154,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 queryAll h3#queryAll queryAll
pre.prettyprint pre.prettyprint

View File

@ -4,7 +4,34 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/pipes/number_pipe.ts#L56-L94">angular2/src/core/pipes/number_pipe.ts (line 56)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/pipes/number_pipe.ts#L56-L94">angular2/src/core/pipes/number_pipe.ts (line 56)</a>
:markdown :markdown
Starting point to import all public core APIs. WARNING: this pipe uses the Internationalization API.
Therefore it is only reliable in Chrome and Opera browsers.
Formats a number as local text. i.e. group sizing and seperator and other locale-specific
configurations are based on the active locale.
# Usage
expression | number[:digitInfo]
where `expression` is a number and `digitInfo` has the following format:
{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}
- minIntegerDigits is the minimum number of integer digits to use. Defaults to 1.
- minFractionDigits is the minimum number of digits after fraction. Defaults to 0.
- maxFractionDigits is the maximum number of digits after fraction. Defaults to 3.
For more information on the acceptable range for each of these numbers and other
details see your native internationalization library.
# Examples
{{ 123 | number }} // output is 123
{{ 123.1 | number: '.2-3' }} // output is 123.10
{{ 1 | number: '2.2' }} // output is 01.00
.l-main-section .l-main-section
h2 Annotations h2 Annotations
@ -25,7 +52,7 @@ p.location-badge.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 transform h3#transform transform
pre.prettyprint pre.prettyprint
@ -37,5 +64,3 @@ p.location-badge.

View File

@ -4,7 +4,6 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/forms/directives/validators.ts#L7-L14">angular2/src/core/forms/directives/validators.ts (line 7)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/forms/directives/validators.ts#L7-L14">angular2/src/core/forms/directives/validators.ts (line 7)</a>
:markdown :markdown
Starting point to import all public core APIs.
.l-main-section .l-main-section
h2 Annotations h2 Annotations

View File

@ -1,10 +1,18 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/forms/directives/default_value_accessor.ts#L8-L73">angular2/src/core/forms/directives/default_value_accessor.ts (line 8)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/forms/directives/default_value_accessor.ts#L8-L71">angular2/src/core/forms/directives/default_value_accessor.ts (line 8)</a>
:markdown :markdown
Starting point to import all public core APIs. The default accessor for writing a value and listening to changes that is used by the
<a href='NgModel-class.html'><code>NgModel</code></a>, <a href='NgFormControl-class.html'><code>NgFormControl</code></a>, and <a href='NgControlName-class.html'><code>NgControlName</code></a> directives.
# Example
```
<input type="text" [(ng-model)]="searchQuery">
```
.l-main-section .l-main-section
h2 Annotations h2 Annotations
@ -32,7 +40,7 @@ p.location-badge.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -44,10 +52,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 onChange h3#onChange onChange
:markdown :markdown
@ -56,10 +62,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 onTouched h3#onTouched onTouched
:markdown :markdown
@ -68,10 +72,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 writeValue h3#writeValue writeValue
pre.prettyprint pre.prettyprint
@ -84,10 +86,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 ngClassUntouched h3#ngClassUntouched ngClassUntouched
:markdown :markdown
@ -96,10 +96,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 ngClassTouched h3#ngClassTouched ngClassTouched
:markdown :markdown
@ -108,10 +106,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 ngClassPristine h3#ngClassPristine ngClassPristine
:markdown :markdown
@ -120,10 +116,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 ngClassDirty h3#ngClassDirty ngClassDirty
:markdown :markdown
@ -132,10 +126,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 ngClassValid h3#ngClassValid ngClassValid
:markdown :markdown
@ -144,10 +136,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 ngClassInvalid h3#ngClassInvalid ngClassInvalid
:markdown :markdown
@ -156,10 +146,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 registerOnChange h3#registerOnChange registerOnChange
pre.prettyprint pre.prettyprint
@ -172,10 +160,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 registerOnTouched h3#registerOnTouched registerOnTouched
pre.prettyprint pre.prettyprint
@ -187,5 +173,3 @@ p.location-badge.

View File

@ -4,11 +4,10 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/binding.ts#L29-L39">angular2/src/core/di/binding.ts (line 29)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/binding.ts#L29-L39">angular2/src/core/di/binding.ts (line 29)</a>
:markdown :markdown
Starting point to import all public core APIs.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -20,10 +19,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 key h3#key key
:markdown :markdown
@ -32,10 +29,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 optional h3#optional optional
:markdown :markdown
@ -44,10 +39,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 lowerBoundVisibility h3#lowerBoundVisibility lowerBoundVisibility
:markdown :markdown
@ -56,10 +49,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 upperBoundVisibility h3#upperBoundVisibility upperBoundVisibility
:markdown :markdown
@ -68,10 +59,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 properties h3#properties properties
:markdown :markdown
@ -79,5 +68,3 @@ p.location-badge.

View File

@ -1,17 +1,42 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/metadata.ts#L34-L65">angular2/src/core/di/metadata.ts (line 34)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/metadata.ts#L33-L64">angular2/src/core/di/metadata.ts (line 33)</a>
:markdown :markdown
Starting point to import all public core APIs. `DependencyMetadata` is used by the framework to extend DI.
Only metadata implementing `DependencyMetadata` are added to the list of dependency
properties.
For example:
```
class Exclude extends DependencyMetadata {}
class NotDependencyProperty {}
class AComponent {
constructor(@Exclude @NotDependencyProperty aService:AService) {}
}
```
will create the following dependency:
```
new Dependency(Key.get(AService), [new Exclude()])
```
The framework can use `new Exclude()` to handle the `aService` dependency
in a specific way.
.l-main-section .l-main-section
h2 Annotations h2 Annotations
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 token h3#token token
:markdown :markdown
@ -19,5 +44,3 @@ p.location-badge.

View File

@ -4,11 +4,13 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/injector.ts#L387-L394">angular2/src/core/di/injector.ts (line 387)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/injector.ts#L387-L394">angular2/src/core/di/injector.ts (line 387)</a>
:markdown :markdown
Starting point to import all public core APIs. Used to provide dependencies that cannot be easily expressed as bindings.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 getDependency h3#getDependency getDependency
pre.prettyprint pre.prettyprint
@ -20,5 +22,3 @@ p.location-badge.

View File

@ -2,7 +2,7 @@
.l-main-section .l-main-section
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L492-L492">angular2/src/core/metadata.ts (line 492)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L496-L496">angular2/src/core/metadata.ts (line 496)</a>
:markdown :markdown
<a href='DirectiveMetadata-class.html'><code>DirectiveMetadata</code></a> factory function. <a href='DirectiveMetadata-class.html'><code>DirectiveMetadata</code></a> factory function.

View File

@ -4,4 +4,8 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L50-L57">angular2/src/core/metadata.ts (line 50)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L50-L57">angular2/src/core/metadata.ts (line 50)</a>
:markdown :markdown
Starting point to import all public core APIs. Interface for the <a href='DirectiveMetadata-class.html'><code>DirectiveMetadata</code></a> decorator function.
See <a href='DirectiveFactory-interface.html'><code>DirectiveFactory</code></a>.

View File

@ -4,4 +4,43 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L97-L148">angular2/src/core/metadata.ts (line 97)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L97-L148">angular2/src/core/metadata.ts (line 97)</a>
:markdown :markdown
Starting point to import all public core APIs. <a href='DirectiveMetadata-class.html'><code>DirectiveMetadata</code></a> factory for creating annotations, decorators or DSL.
## Example as TypeScript Decorator
```
import {Directive} from "angular2/angular2";
@Directive({...})
class MyDirective {
constructor() {
...
}
}
```
## Example as ES5 DSL
```
var MyDirective = ng
.Directive({...})
.Class({
constructor: function() {
...
}
})
```
## Example as ES5 annotation
```
var MyDirective = function() {
...
};
MyDirective.annotations = [
new ng.Directive({...})
]
```

View File

@ -1,23 +1,401 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata/directives.ts#L3-L722">angular2/src/core/metadata/directives.ts (line 3)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata/directives.ts#L3-L745">angular2/src/core/metadata/directives.ts (line 3)</a>
:markdown :markdown
Starting point to import all public core APIs. Directives allow you to attach behavior to elements in the DOM.
<a href='DirectiveMetadata-class.html'><code>DirectiveMetadata</code></a>s with an embedded view are called <a href='ComponentMetadata-class.html'><code>ComponentMetadata</code></a>s.
A directive consists of a single directive annotation and a controller class. When the
directive's `selector` matches
elements in the DOM, the following steps occur:
1. For each directive, the `ElementInjector` attempts to resolve the directive's constructor
arguments.
2. Angular instantiates directives for each matched element using `ElementInjector` in a
depth-first order,
as declared in the HTML.
## Understanding How Injection Works
There are three stages of injection resolution.
- *Pre-existing Injectors*:
- The terminal <a href='Injector-class.html'><code>Injector</code></a> cannot resolve dependencies. It either throws an error or, if
the dependency was
specified as `@Optional`, returns `null`.
- The platform injector resolves browser singleton resources, such as: cookies, title,
location, and others.
- *Component Injectors*: Each component instance has its own <a href='Injector-class.html'><code>Injector</code></a>, and they follow
the same parent-child hierarchy
as the component instances in the DOM.
- *Element Injectors*: Each component instance has a Shadow DOM. Within the Shadow DOM each
element has an `ElementInjector`
which follow the same parent-child hierarchy as the DOM elements themselves.
When a template is instantiated, it also must instantiate the corresponding directives in a
depth-first order. The
current `ElementInjector` resolves the constructor dependencies for each directive.
Angular then resolves dependencies as follows, according to the order in which they appear in the
<a href='ViewMetadata-class.html'><code>ViewMetadata</code></a>:
1. Dependencies on the current element
2. Dependencies on element injectors and their parents until it encounters a Shadow DOM boundary
3. Dependencies on component injectors and their parents until it encounters the root component
4. Dependencies on pre-existing injectors
The `ElementInjector` can inject other directives, element-specific special objects, or it can
delegate to the parent
injector.
To inject other directives, declare the constructor parameter as:
- `directive:DirectiveType`: a directive on the current element only
- `@Host() directive:DirectiveType`: any directive that matches the type between the current
element and the
Shadow DOM root.
- `@Query(DirectiveType) query:QueryList<DirectiveType>`: A live collection of direct child
directives.
- `@QueryDescendants(DirectiveType) query:QueryList<DirectiveType>`: A live collection of any
child directives.
To inject element-specific special objects, declare the constructor parameter as:
- `element: ElementRef` to obtain a reference to logical element in the view.
- `viewContainer: ViewContainerRef` to control child template instantiation, for
<a href='DirectiveMetadata-class.html'><code>DirectiveMetadata</code></a> directives only
- `bindingPropagation: BindingPropagation` to control change detection in a more granular way.
## Example
The following example demonstrates how dependency injection resolves constructor arguments in
practice.
Assume this HTML template:
```
<div dependency="1">
<div dependency="2">
<div dependency="3" my-directive>
<div dependency="4">
<div dependency="5"></div>
</div>
<div dependency="6"></div>
</div>
</div>
</div>
```
With the following `dependency` decorator and `SomeService` injectable class.
```
@Injectable()
class SomeService {
}
@Directive({
selector: '[dependency]',
properties: [
'id: dependency'
]
})
class Dependency {
id:string;
}
```
Let's step through the different ways in which `MyDirective` could be declared...
### No injection
Here the constructor is declared with no arguments, therefore nothing is injected into
`MyDirective`.
```
@Directive({ selector: '[my-directive]' })
class MyDirective {
constructor() {
}
}
```
This directive would be instantiated with no dependencies.
### Component-level injection
Directives can inject any injectable instance from the closest component injector or any of its
parents.
Here, the constructor declares a parameter, `someService`, and injects the `SomeService` type
from the parent
component's injector.
```
@Directive({ selector: '[my-directive]' })
class MyDirective {
constructor(someService: SomeService) {
}
}
```
This directive would be instantiated with a dependency on `SomeService`.
### Injecting a directive from the current element
Directives can inject other directives declared on the current element.
```
@Directive({ selector: '[my-directive]' })
class MyDirective {
constructor(dependency: Dependency) {
expect(dependency.id).toEqual(3);
}
}
```
This directive would be instantiated with `Dependency` declared at the same element, in this case
`dependency="3"`.
### Injecting a directive from any ancestor elements
Directives can inject other directives declared on any ancestor element (in the current Shadow
DOM), i.e. on the current element, the
parent element, or its parents.
```
@Directive({ selector: '[my-directive]' })
class MyDirective {
constructor(@Host() dependency: Dependency) {
expect(dependency.id).toEqual(2);
}
}
```
`@Host` checks the current element, the parent, as well as its parents recursively. If
`dependency="2"` didn't
exist on the direct parent, this injection would
have returned
`dependency="1"`.
### Injecting a live collection of direct child directives
A directive can also query for other child directives. Since parent directives are instantiated
before child directives, a directive can't simply inject the list of child directives. Instead,
the directive injects a <a href='QueryList-class.html'><code>QueryList</code></a>, which updates its contents as children are added,
removed, or moved by a directive that uses a <a href='ViewContainerRef-interface.html'><code>ViewContainerRef</code></a> such as a `ng-for`, an
`ng-if`, or an `ng-switch`.
```
@Directive({ selector: '[my-directive]' })
class MyDirective {
constructor(@Query(Dependency) dependencies:QueryList<Dependency>) {
}
}
```
This directive would be instantiated with a <a href='QueryList-class.html'><code>QueryList</code></a> which contains `Dependency` 4 and
6. Here, `Dependency` 5 would not be included, because it is not a direct child.
### Injecting a live collection of descendant directives
By passing the descendant flag to `@Query` above, we can include the children of the child
elements.
```
@Directive({ selector: '[my-directive]' })
class MyDirective {
constructor(@Query(Dependency, {descendants: true}) dependencies:QueryList<Dependency>) {
}
}
```
This directive would be instantiated with a Query which would contain `Dependency` 4, 5 and 6.
### Optional injection
The normal behavior of directives is to return an error when a specified dependency cannot be
resolved. If you
would like to inject `null` on unresolved dependency instead, you can annotate that dependency
with `@Optional()`.
This explicitly permits the author of a template to treat some of the surrounding directives as
optional.
```
@Directive({ selector: '[my-directive]' })
class MyDirective {
constructor(@Optional() dependency:Dependency) {
}
}
```
This directive would be instantiated with a `Dependency` directive found on the current element.
If none can be
found, the injector supplies `null` instead of throwing an error.
## Example
Here we use a decorator directive to simply define basic tool-tip behavior.
```
@Directive({
selector: '[tooltip]',
properties: [
'text: tooltip'
],
host: {
'(mouseenter)': 'onMouseEnter()',
'(mouseleave)': 'onMouseLeave()'
}
})
class Tooltip{
text:string;
overlay:Overlay; // NOT YET IMPLEMENTED
overlayManager:OverlayManager; // NOT YET IMPLEMENTED
constructor(overlayManager:OverlayManager) {
this.overlay = overlay;
}
onMouseEnter() {
// exact signature to be determined
this.overlay = this.overlayManager.open(text, ...);
}
onMouseLeave() {
this.overlay.close();
this.overlay = null;
}
}
```
In our HTML template, we can then add this behavior to a `<div>` or any other element with the
`tooltip` selector,
like so:
```
<div tooltip="some text here"></div>
```
Directives can also control the instantiation, destruction, and positioning of inline template
elements:
A directive uses a <a href='ViewContainerRef-interface.html'><code>ViewContainerRef</code></a> to instantiate, insert, move, and destroy views at
runtime.
The <a href='ViewContainerRef-interface.html'><code>ViewContainerRef</code></a> is created as a result of `<template>` element, and represents a
location in the current view
where these actions are performed.
Views are always created as children of the current <a href='ViewMetadata-class.html'><code>ViewMetadata</code></a>, and as siblings of the
`<template>` element. Thus a
directive in a child view cannot inject the directive that created it.
Since directives that create views via ViewContainers are common in Angular, and using the full
`<template>` element syntax is wordy, Angular
also supports a shorthand notation: `<li *foo="bar">` and `<li template="foo: bar">` are
equivalent.
Thus,
```
<ul>
<li *foo="bar" title="text"></li>
</ul>
```
Expands in use to:
```
<ul>
<template [foo]="bar">
<li title="text"></li>
</template>
</ul>
```
Notice that although the shorthand places `*foo="bar"` within the `<li>` element, the binding for
the directive
controller is correctly instantiated on the `<template>` element rather than the `<li>` element.
## Lifecycle hooks
When the directive class implements some <a href='../lifecycle_hooks'><code>undefined</code></a> the callbacks are
called by the change detection at defined points in time during the life of the directive.
## Example
Let's suppose we want to implement the `unless` behavior, to conditionally include a template.
Here is a simple directive that triggers on an `unless` selector:
```
@Directive({
selector: '[unless]',
properties: ['unless']
})
export class Unless {
viewContainer: ViewContainerRef;
templateRef: TemplateRef;
prevCondition: boolean;
constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef) {
this.viewContainer = viewContainer;
this.templateRef = templateRef;
this.prevCondition = null;
}
set unless(newCondition) {
if (newCondition && (isBlank(this.prevCondition) || !this.prevCondition)) {
this.prevCondition = true;
this.viewContainer.clear();
} else if (!newCondition && (isBlank(this.prevCondition) || this.prevCondition)) {
this.prevCondition = false;
this.viewContainer.create(this.templateRef);
}
}
}
```
We can then use this `unless` selector in a template:
```
<ul>
<li *unless="expr"></li>
</ul>
```
Once the directive instantiates the child view, the shorthand notation for the template expands
and the result is:
```
<ul>
<template [unless]="exp">
<li></li>
</template>
<li></li>
</ul>
```
Note also that although the `<li></li>` template still exists inside the `<template></template>`,
the instantiated
view occurs on the second `<li></li>` which is a sibling to the `<template>` element.
.l-main-section .l-main-section
h2 Annotations h2 Annotations
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
code. code.
constructor({ constructor({
selector, properties, events, host, bindings, exportAs, compileChildren = true, selector, properties, events, host, bindings, exportAs, moduleId,
compileChildren = true,
}?: { }?: {
selector?: string, selector?: string,
properties?: string[], properties?: string[],
@ -25,6 +403,7 @@ p.location-badge.
host?: StringMap&lt;string, string&gt;, host?: StringMap&lt;string, string&gt;,
bindings?: any[], bindings?: any[],
exportAs?: string, exportAs?: string,
moduleId?: string,
compileChildren?: boolean, compileChildren?: boolean,
}) })
@ -33,10 +412,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 selector h3#selector selector
:markdown :markdown
@ -77,7 +454,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 properties h3#properties properties
:markdown :markdown
@ -155,7 +532,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 events h3#events events
:markdown :markdown
@ -207,11 +584,11 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 host h3#host host
:markdown :markdown
Specifiy the events, actions, properties and attributes related to the host element. Specify the events, actions, properties and attributes related to the host element.
## Events ## Events
@ -220,7 +597,7 @@ p.location-badge.
- `event1`: the DOM event that the directive listens to. - `event1`: the DOM event that the directive listens to.
- `statement`: the statement to execute when the event occurs. - `statement`: the statement to execute when the event occurs.
If the evalutation of the statement returns `false`, then `preventDefault`is applied on the DOM If the evaluation of the statement returns `false`, then `preventDefault`is applied on the DOM
event. event.
To listen to global events, a target must be added to the event name. To listen to global events, a target must be added to the event name.
@ -285,7 +662,7 @@ p.location-badge.
} }
``` ```
In this example the prop property of the host element is updated with the expression value In this example the `prop` property of the host element is updated with the expression value
every time it changes. every time it changes.
## Attributes ## Attributes
@ -316,7 +693,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 compileChildren h3#compileChildren compileChildren
:markdown :markdown
@ -329,11 +706,11 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 bindings h3#bindings bindings
:markdown :markdown
Defines the set of injectable objects that are visible to a Directive and its light dom Defines the set of injectable objects that are visible to a Directive and its light DOM
children. children.
## Simple Example ## Simple Example
@ -369,7 +746,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 exportAs h3#exportAs exportAs
:markdown :markdown
@ -402,3 +779,31 @@ p.location-badge.
.l-sub-section
h3#moduleId moduleId
:markdown
The module id of the module that contains the directive.
Needed to be able to resolve relative urls for templates and styles.
In Dart, this can be determined automatically and does not need to be set.
In CommonJS, this can always be set to `module.id`.
## Simple Example
```
@Directive({
selector: 'someDir',
moduleId: module.id
})
class SomeDir {
}
```

View File

@ -1,10 +1,16 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/directive_resolver.ts#L13-L115">angular2/src/core/compiler/directive_resolver.ts (line 13)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/directive_resolver.ts#L13-L119">angular2/src/core/compiler/directive_resolver.ts (line 13)</a>
:markdown :markdown
Starting point to import all public core APIs. Resolve a `Type` for <a href='DirectiveMetadata-class.html'><code>DirectiveMetadata</code></a>.
This interface can be overridden by the application developer to create custom behavior.
See <a href='Compiler-interface.html'><code>Compiler</code></a>
.l-main-section .l-main-section
h2 Annotations h2 Annotations
@ -18,7 +24,7 @@ p.location-badge.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 resolve h3#resolve resolve
pre.prettyprint pre.prettyprint

View File

@ -1,24 +0,0 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/interfaces.ts#L65-L88">angular2/src/core/compiler/interfaces.ts (line 65)</a>
:markdown
Starting point to import all public core APIs.
.l-main-section
h2 Members
.l-sub-section
h3 doCheck
pre.prettyprint
code.
doCheck()
:markdown

View File

@ -0,0 +1,40 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/interfaces.ts#L72-L93">angular2/src/core/compiler/interfaces.ts (line 72)</a>
:markdown
Overrides the default change detection.
`doCheck()` gets called to check the changes in the directives instead of the default
change detection mechanism.
It is invoked every time the change detection is triggered.
## Example
```
@Component(...)
class MyComponent implements DoCheck {
doCheck(): void {
// Custom logic to detect changes
}
}
```
.l-main-section
h2 Members
.l-sub-section
h3#doCheck doCheck
pre.prettyprint
code.
doCheck()
:markdown

View File

@ -1,290 +0,0 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/render/dom/dom_renderer.ts#L34-L267">angular2/src/core/render/dom/dom_renderer.ts (line 34)</a>
:markdown
Starting point to import all public core APIs.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Injectable
pre.prettyprint
code.
@Injectable()
.l-main-section
h2 Members
.l-sub-section
h3 createRootHostView
pre.prettyprint
code.
createRootHostView(hostProtoViewRef: RenderProtoViewRef, fragmentCount: number, hostElementSelector: string)
:markdown
.l-sub-section
h3 createView
pre.prettyprint
code.
createView(protoViewRef: RenderProtoViewRef, fragmentCount: number)
:markdown
.l-sub-section
h3 destroyView
pre.prettyprint
code.
destroyView(viewRef: RenderViewRef)
:markdown
.l-sub-section
h3 getNativeElementSync
pre.prettyprint
code.
getNativeElementSync(location: RenderElementRef)
:markdown
.l-sub-section
h3 getRootNodes
pre.prettyprint
code.
getRootNodes(fragment: RenderFragmentRef)
:markdown
.l-sub-section
h3 attachFragmentAfterFragment
pre.prettyprint
code.
attachFragmentAfterFragment(previousFragmentRef: RenderFragmentRef, fragmentRef: RenderFragmentRef)
:markdown
.l-sub-section
h3 attachFragmentAfterElement
pre.prettyprint
code.
attachFragmentAfterElement(elementRef: RenderElementRef, fragmentRef: RenderFragmentRef)
:markdown
.l-sub-section
h3 detachFragment
pre.prettyprint
code.
detachFragment(fragmentRef: RenderFragmentRef)
:markdown
.l-sub-section
h3 hydrateView
pre.prettyprint
code.
hydrateView(viewRef: RenderViewRef)
:markdown
.l-sub-section
h3 dehydrateView
pre.prettyprint
code.
dehydrateView(viewRef: RenderViewRef)
:markdown
.l-sub-section
h3 setElementProperty
pre.prettyprint
code.
setElementProperty(location: RenderElementRef, propertyName: string, propertyValue: any)
:markdown
.l-sub-section
h3 setElementAttribute
pre.prettyprint
code.
setElementAttribute(location: RenderElementRef, attributeName: string, attributeValue: string)
:markdown
.l-sub-section
h3 setElementClass
pre.prettyprint
code.
setElementClass(location: RenderElementRef, className: string, isAdd: boolean)
:markdown
.l-sub-section
h3 setElementStyle
pre.prettyprint
code.
setElementStyle(location: RenderElementRef, styleName: string, styleValue: string)
:markdown
.l-sub-section
h3 invokeElementMethod
pre.prettyprint
code.
invokeElementMethod(location: RenderElementRef, methodName: string, args: any[])
:markdown
.l-sub-section
h3 setText
pre.prettyprint
code.
setText(viewRef: RenderViewRef, textNodeIndex: number, text: string)
:markdown
.l-sub-section
h3 setEventDispatcher
pre.prettyprint
code.
setEventDispatcher(viewRef: RenderViewRef, dispatcher: any)
:markdown

View File

@ -1,10 +1,13 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/dynamic_component_loader.ts#L42-L235">angular2/src/core/compiler/dynamic_component_loader.ts (line 42)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/dynamic_component_loader.ts#L58-L257">angular2/src/core/compiler/dynamic_component_loader.ts (line 58)</a>
:markdown :markdown
Starting point to import all public core APIs. Service for dynamically loading a Component into an arbitrary position in the internal Angular
application tree.
.l-main-section .l-main-section
h2 Annotations h2 Annotations
@ -18,7 +21,7 @@ p.location-badge.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -30,15 +33,13 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 loadAsRoot h3#loadAsRoot loadAsRoot
pre.prettyprint pre.prettyprint
code. code.
loadAsRoot(typeOrBinding: Type | Binding, overrideSelector: string, injector: Injector) loadAsRoot(typeOrBinding: Type | Binding, overrideSelector: string, injector: Injector, onDispose?: () =&gt; void)
:markdown :markdown
Loads a root component that is placed at the first element that matches the component's Loads a root component that is placed at the first element that matches the component's
@ -102,7 +103,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 loadIntoLocation h3#loadIntoLocation loadIntoLocation
pre.prettyprint pre.prettyprint
@ -163,7 +164,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 loadNextToLocation h3#loadNextToLocation loadNextToLocation
pre.prettyprint pre.prettyprint

View File

@ -6,5 +6,3 @@
:markdown :markdown

View File

@ -4,11 +4,17 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/element_ref.ts#L3-L62">angular2/src/core/compiler/element_ref.ts (line 3)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/element_ref.ts#L3-L62">angular2/src/core/compiler/element_ref.ts (line 3)</a>
:markdown :markdown
Starting point to import all public core APIs. An opaque reference to the underlying element.
The underlying native element is a DOM Element in a browser context, but may represent other
types on other rendering platforms. In the browser the `ElementRef` can be sent to the Web
Worker. Web Workers can not have references to the DOM Elements.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -20,10 +26,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 parentView h3#parentView parentView
:markdown :markdown
@ -36,7 +40,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 boundElementIndex h3#boundElementIndex boundElementIndex
:markdown :markdown
@ -51,7 +55,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 renderBoundElementIndex h3#renderBoundElementIndex renderBoundElementIndex
:markdown :markdown
@ -66,7 +70,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 renderView h3#renderView renderView
:markdown :markdown
@ -75,12 +79,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 nativeElement h3#nativeElement nativeElement
:markdown :markdown

View File

@ -2,7 +2,7 @@
.l-main-section .l-main-section
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L529-L529">angular2/src/core/metadata.ts (line 529)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L533-L533">angular2/src/core/metadata.ts (line 533)</a>
:markdown :markdown
<a href='EventMetadata-class.html'><code>EventMetadata</code></a> factory function. <a href='EventMetadata-class.html'><code>EventMetadata</code></a> factory function.

View File

@ -1,14 +1,51 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/facade/async.ts#L90-L157">angular2/src/core/facade/async.ts (line 90)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/facade/async.ts#L91-L147">angular2/src/core/facade/async.ts (line 91)</a>
:markdown :markdown
Starting point to import all public core APIs. Use by directives and components to emit custom <a href='Event-var.html'><code>Event</code></a>s.
## Examples
In the following example, `Zippy` alternatively emits `open` and `close` events when its
title gets clicked:
```
@Component({selector: 'zippy'})
@View({template: `
<div class="zippy">
<div (click)="toggle()">Toggle</div>
<div [hidden]="!visible">
<ng-content></ng-content>
</div>
</div>`})
export class Zippy {
visible: boolean = true;
@Event() open: EventEmitter = new EventEmitter();
@Event() close: EventEmitter = new EventEmitter();
toggle() {
this.visible = !this.visible;
if (this.visible) {
this.open.next(null);
} else {
this.close.next(null);
}
}
}
```
Use Rx.Observable but provides an adapter to make it work as specified here:
https://github.com/jhusain/observable-spec
Once a reference implementation of the spec is available, switch to it.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 observer h3#observer observer
pre.prettyprint pre.prettyprint
@ -21,10 +58,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 toRx h3#toRx toRx
pre.prettyprint pre.prettyprint
@ -37,10 +72,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 next h3#next next
pre.prettyprint pre.prettyprint
@ -48,16 +81,13 @@ p.location-badge.
next(value: any) next(value: any)
:markdown :markdown
Emits a `value`.
.l-sub-section .l-sub-section
h3 throw h3#throw throw
pre.prettyprint pre.prettyprint
@ -65,16 +95,13 @@ p.location-badge.
throw(error: any) throw(error: any)
:markdown :markdown
Emits an `error`.
.l-sub-section .l-sub-section
h3 return h3#return return
pre.prettyprint pre.prettyprint
@ -82,9 +109,6 @@ p.location-badge.
return(value?: any) return(value?: any)
:markdown :markdown
Closes the stream.

View File

@ -1,7 +1,21 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L423-L443">angular2/src/core/metadata.ts (line 423)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L427-L447">angular2/src/core/metadata.ts (line 427)</a>
:markdown :markdown
Starting point to import all public core APIs. <a href='EventMetadata-class.html'><code>EventMetadata</code></a> factory for creating decorators.
## Example as TypeScript Decorator
```
@Directive({
selector: 'sample-dir'
})
class SampleDir {
@Event() event = new EventEmitter(); // Same as @Event('event') event = new EventEmitter();
@Event("el-event") dirEvent = new EventEmitter();
}
```

View File

@ -1,17 +1,31 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata/directives.ts#L893-L913">angular2/src/core/metadata/directives.ts (line 893)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata/directives.ts#L951-L971">angular2/src/core/metadata/directives.ts (line 951)</a>
:markdown :markdown
Starting point to import all public core APIs. Declare a bound event.
## Example
```
@Directive({
selector: 'sample-dir'
})
class SampleDir {
@Event() event = new EventEmitter(); // Same as @Event('event') event = new EventEmitter();
@Event("el-event") dirEvent = new EventEmitter();
}
```
.l-main-section .l-main-section
h2 Annotations h2 Annotations
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -23,10 +37,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 bindingPropertyName h3#bindingPropertyName bindingPropertyName
:markdown :markdown
@ -34,5 +46,3 @@ p.location-badge.

View File

@ -4,11 +4,19 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/change_detection/exceptions.ts#L1-L17">angular2/src/core/change_detection/exceptions.ts (line 1)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/change_detection/exceptions.ts#L1-L17">angular2/src/core/change_detection/exceptions.ts (line 1)</a>
:markdown :markdown
Starting point to import all public core APIs. An error thrown if application changes model breaking the top-down data flow.
Angular expects that the data flows from top (root) component to child (leaf) components.
This is known as directed acyclic graph. This allows Angular to only execute change detection
once and prevents loops in change detection data flow.
This exception is only thrown in dev mode.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -19,5 +27,3 @@ p.location-badge.

View File

@ -6,5 +6,3 @@
:markdown :markdown

View File

@ -4,11 +4,15 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/forms/directives/form_interface.ts#L3-L18">angular2/src/core/forms/directives/form_interface.ts (line 3)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/forms/directives/form_interface.ts#L3-L18">angular2/src/core/forms/directives/form_interface.ts (line 3)</a>
:markdown :markdown
Starting point to import all public core APIs. An interface that <a href='NgFormModel-class.html'><code>NgFormModel</code></a> and <a href='NgForm-class.html'><code>NgForm</code></a> implement.
Only used by the forms module.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 addControl h3#addControl addControl
pre.prettyprint pre.prettyprint
@ -21,10 +25,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 removeControl h3#removeControl removeControl
pre.prettyprint pre.prettyprint
@ -37,10 +39,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 getControl h3#getControl getControl
pre.prettyprint pre.prettyprint
@ -53,10 +53,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 addControlGroup h3#addControlGroup addControlGroup
pre.prettyprint pre.prettyprint
@ -69,10 +67,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 removeControlGroup h3#removeControlGroup removeControlGroup
pre.prettyprint pre.prettyprint
@ -85,10 +81,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 getControlGroup h3#getControlGroup getControlGroup
pre.prettyprint pre.prettyprint
@ -101,10 +95,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 updateModel h3#updateModel updateModel
pre.prettyprint pre.prettyprint
@ -116,5 +108,3 @@ p.location-badge.

View File

@ -1,10 +1,69 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/forms/form_builder.ts#L4-L126">angular2/src/core/forms/form_builder.ts (line 4)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/forms/form_builder.ts#L4-L122">angular2/src/core/forms/form_builder.ts (line 4)</a>
:markdown :markdown
Starting point to import all public core APIs. Creates a form object from a user-specified configuration.
# Example
```
import {Component, View, bootstrap} from 'angular2/angular2';
import {FormBuilder, Validators, FORM_DIRECTIVES, ControlGroup} from 'angular2/core';
@Component({
selector: 'login-comp',
viewBindings: [FormBuilder]
})
@View({
template: `
<form [control-group]="loginForm">
Login <input control="login">
<div control-group="passwordRetry">
Password <input type="password" control="password">
Confirm password <input type="password" control="passwordConfirmation">
</div>
</form>
`,
directives: [FORM_DIRECTIVES]
})
class LoginComp {
loginForm: ControlGroup;
constructor(builder: FormBuilder) {
this.loginForm = builder.group({
login: ["", Validators.required],
passwordRetry: builder.group({
password: ["", Validators.required],
passwordConfirmation: ["", Validators.required]
})
});
}
}
bootstrap(LoginComp);
```
This example creates a <a href='ControlGroup-class.html'><code>ControlGroup</code></a> that consists of a `login` <a href='Control-class.html'><code>Control</code></a>, and a
nested <a href='ControlGroup-class.html'><code>ControlGroup</code></a> that defines a `password` and a `passwordConfirmation`
<a href='Control-class.html'><code>Control</code></a>:
```
var loginForm = builder.group({
login: ["", Validators.required],
passwordRetry: builder.group({
password: ["", Validators.required],
passwordConfirmation: ["", Validators.required]
})
});
```
.l-main-section .l-main-section
h2 Annotations h2 Annotations
@ -18,7 +77,7 @@ p.location-badge.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 group h3#group group
pre.prettyprint pre.prettyprint
@ -31,10 +90,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 control h3#control control
pre.prettyprint pre.prettyprint
@ -47,10 +104,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 array h3#array array
pre.prettyprint pre.prettyprint
@ -62,5 +117,3 @@ p.location-badge.

View File

@ -4,4 +4,3 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/forward_ref.ts#L1-L3">angular2/src/core/di/forward_ref.ts (line 1)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/forward_ref.ts#L1-L3">angular2/src/core/di/forward_ref.ts (line 1)</a>
:markdown :markdown
Starting point to import all public core APIs.

View File

@ -2,7 +2,7 @@
.l-main-section .l-main-section
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L534-L534">angular2/src/core/metadata.ts (line 534)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L538-L538">angular2/src/core/metadata.ts (line 538)</a>
:markdown :markdown
<a href='HostBindingMetadata-class.html'><code>HostBindingMetadata</code></a> factory function. <a href='HostBindingMetadata-class.html'><code>HostBindingMetadata</code></a> factory function.

View File

@ -1,7 +1,21 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L443-L463">angular2/src/core/metadata.ts (line 443)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L447-L467">angular2/src/core/metadata.ts (line 447)</a>
:markdown :markdown
Starting point to import all public core APIs. <a href='HostBindingMetadata-class.html'><code>HostBindingMetadata</code></a> factory for creating decorators.
## Example as TypeScript Decorator
```
@Directive({
selector: 'sample-dir'
})
class SampleDir {
@HostBinding() prop1; // Same as @HostBinding('prop1') prop1;
@HostBinding("el-prop") prop1;
}
```

View File

@ -1,17 +1,44 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata/directives.ts#L913-L946">angular2/src/core/metadata/directives.ts (line 913)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata/directives.ts#L971-L1004">angular2/src/core/metadata/directives.ts (line 971)</a>
:markdown :markdown
Starting point to import all public core APIs. Declare a host property binding.
## Example
```
@Directive({
selector: 'sample-dir'
})
class SampleDir {
@HostBinding() prop1; // Same as @HostBinding('prop1') prop1;
@HostBinding("el-prop") prop2;
}
```
This is equivalent to
```
@Directive({
selector: 'sample-dir',
host: {'[prop1]': 'prop1', '[el-prop]': 'prop2'}
})
class SampleDir {
prop1;
prop2;
}
```
.l-main-section .l-main-section
h2 Annotations h2 Annotations
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -23,10 +50,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 hostPropertyName h3#hostPropertyName hostPropertyName
:markdown :markdown
@ -34,5 +59,3 @@ p.location-badge.

View File

@ -4,4 +4,6 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/decorators.ts#L41-L49">angular2/src/core/di/decorators.ts (line 41)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/decorators.ts#L41-L49">angular2/src/core/di/decorators.ts (line 41)</a>
:markdown :markdown
Starting point to import all public core APIs. Factory for creating <a href='HostMetadata-class.html'><code>HostMetadata</code></a>.

View File

@ -2,7 +2,7 @@
.l-main-section .l-main-section
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L539-L539">angular2/src/core/metadata.ts (line 539)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L543-L543">angular2/src/core/metadata.ts (line 543)</a>
:markdown :markdown
<a href='HostListenerMetadata-class.html'><code>HostListenerMetadata</code></a> factory function. <a href='HostListenerMetadata-class.html'><code>HostListenerMetadata</code></a> factory function.

View File

@ -1,7 +1,20 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L463-L482">angular2/src/core/metadata.ts (line 463)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L467-L486">angular2/src/core/metadata.ts (line 467)</a>
:markdown :markdown
Starting point to import all public core APIs. <a href='HostListenerMetadata-class.html'><code>HostListenerMetadata</code></a> factory for creating decorators.
## Example as TypeScript Decorator
```
@Directive({
selector: 'sample-dir'
})
class SampleDir {
@HostListener("change", ['$event.target.value']) onChange(value){}
}
```

View File

@ -1,17 +1,42 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata/directives.ts#L946-L977">angular2/src/core/metadata/directives.ts (line 946)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata/directives.ts#L1004-L1035">angular2/src/core/metadata/directives.ts (line 1004)</a>
:markdown :markdown
Starting point to import all public core APIs. Declare a host listener.
## Example
```
@Directive({
selector: 'sample-dir'
})
class SampleDir {
@HostListener("change", ['$event.target.value']) onChange(value){}
}
```
This is equivalent to
```
@Directive({
selector: 'sample-dir',
host: {'(change)': 'onChange($event.target.value)'}
})
class SampleDir {
onChange(value){}
}
```
.l-main-section .l-main-section
h2 Annotations h2 Annotations
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -23,10 +48,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 eventName h3#eventName eventName
:markdown :markdown
@ -35,10 +58,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 args h3#args args
:markdown :markdown
@ -46,5 +67,3 @@ p.location-badge.

View File

@ -1,17 +1,39 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/metadata.ts#L138-L166">angular2/src/core/di/metadata.ts (line 138)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/metadata.ts#L137-L165">angular2/src/core/di/metadata.ts (line 137)</a>
:markdown :markdown
Starting point to import all public core APIs. Specifies that an injector should retrieve a dependency from any injector until reaching the
closest host.
## Example
```
class Dependency {
}
class NeedsDependency {
constructor(public @Host() dependency:Dependency) {}
}
var parent = Injector.resolveAndCreate([
bind(Dependency).toClass(HostDependency)
]);
var child = parent.resolveAndCreateChild([]);
var grandChild = child.resolveAndCreateChild([NeedsDependency, Depedency]);
var nd = grandChild.get(NeedsDependency);
expect(nd.dependency).toBeAnInstanceOf(HostDependency);
```
.l-main-section .l-main-section
h2 Annotations h2 Annotations
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 toString h3#toString toString
pre.prettyprint pre.prettyprint
@ -23,5 +45,3 @@ p.location-badge.

View File

@ -4,4 +4,3 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/view_ref.ts#L13-L15">angular2/src/core/compiler/view_ref.ts (line 13)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/view_ref.ts#L13-L15">angular2/src/core/compiler/view_ref.ts (line 13)</a>
:markdown :markdown
Starting point to import all public core APIs.

View File

@ -4,4 +4,6 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/decorators.ts#L9-L17">angular2/src/core/di/decorators.ts (line 9)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/decorators.ts#L9-L17">angular2/src/core/di/decorators.ts (line 9)</a>
:markdown :markdown
Starting point to import all public core APIs. Factory for creating <a href='InjectMetadata-class.html'><code>InjectMetadata</code></a>.

View File

@ -1,17 +1,25 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/metadata.ts#L1-L17">angular2/src/core/di/metadata.ts (line 1)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/metadata.ts#L1-L16">angular2/src/core/di/metadata.ts (line 1)</a>
:markdown :markdown
Starting point to import all public core APIs. A parameter metadata that specifies a dependency.
```
class AComponent {
constructor(@Inject(MyService) aService:MyService) {}
}
```
.l-main-section .l-main-section
h2 Annotations h2 Annotations
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -23,10 +31,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 token h3#token token
:markdown :markdown
@ -35,10 +41,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 toString h3#toString toString
pre.prettyprint pre.prettyprint
@ -50,5 +54,3 @@ p.location-badge.

View File

@ -4,4 +4,6 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/decorators.ts#L25-L33">angular2/src/core/di/decorators.ts (line 25)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/decorators.ts#L25-L33">angular2/src/core/di/decorators.ts (line 25)</a>
:markdown :markdown
Starting point to import all public core APIs. Factory for creating <a href='InjectableMetadata-class.html'><code>InjectableMetadata</code></a>.

View File

@ -1,17 +1,29 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/metadata.ts#L65-L83">angular2/src/core/di/metadata.ts (line 65)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/metadata.ts#L64-L82">angular2/src/core/di/metadata.ts (line 64)</a>
:markdown :markdown
Starting point to import all public core APIs. A marker metadata that marks a class as available to `Injector` for creation. Used by tooling
for generating constructor stubs.
```
class NeedsService {
constructor(svc:UsefulService) {}
}
@Injectable
class UsefulService {}
```
.l-main-section .l-main-section
h2 Annotations h2 Annotations
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -22,5 +34,3 @@ p.location-badge.

View File

@ -4,11 +4,48 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/injector.ts#L394-L831">angular2/src/core/di/injector.ts (line 394)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/injector.ts#L394-L831">angular2/src/core/di/injector.ts (line 394)</a>
:markdown :markdown
Starting point to import all public core APIs. A dependency injection container used for resolving dependencies.
An `Injector` is a replacement for a `new` operator, which can automatically resolve the
constructor dependencies.
In typical use, application code asks for the dependencies in the constructor and they are
resolved by the `Injector`.
## Example:
Suppose that we want to inject an `Engine` into class `Car`, we would define it like this:
```javascript
class Engine {
}
class Car {
constructor(@Inject(Engine) engine) {
}
}
```
Next we need to write the code that creates and instantiates the `Injector`. We then ask for the
`root` object, `Car`, so that the `Injector` can recursively build all of that object's
dependencies.
```javascript
main() {
var injector = Injector.resolveAndCreate([Car, Engine]);
// Get a reference to the `root` object, which will recursively instantiate the tree.
var car = injector.get(Car);
}
```
Notice that we don't use the `new` operator because we explicitly want to have the `Injector`
resolve all of the object's dependencies automatically.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -20,10 +57,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 debugContext h3#debugContext debugContext
pre.prettyprint pre.prettyprint
@ -42,7 +77,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 get h3#get get
pre.prettyprint pre.prettyprint
@ -58,7 +93,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 getOptional h3#getOptional getOptional
pre.prettyprint pre.prettyprint
@ -74,7 +109,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 getAt h3#getAt getAt
pre.prettyprint pre.prettyprint
@ -90,7 +125,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 parent h3#parent parent
:markdown :markdown
@ -103,7 +138,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 internalStrategy h3#internalStrategy internalStrategy
:markdown :markdown
@ -118,7 +153,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 resolveAndCreateChild h3#resolveAndCreateChild resolveAndCreateChild
pre.prettyprint pre.prettyprint
@ -138,7 +173,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 createChildFromResolved h3#createChildFromResolved createChildFromResolved
pre.prettyprint pre.prettyprint
@ -154,7 +189,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 resolveAndInstantiate h3#resolveAndInstantiate resolveAndInstantiate
pre.prettyprint pre.prettyprint
@ -170,7 +205,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 instantiateResolved h3#instantiateResolved instantiateResolved
pre.prettyprint pre.prettyprint
@ -186,7 +221,7 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 displayName h3#displayName displayName
:markdown :markdown
@ -195,10 +230,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 toString h3#toString toString
pre.prettyprint pre.prettyprint
@ -210,5 +243,3 @@ p.location-badge.

View File

@ -1,14 +1,19 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/exceptions.ts#L93-L125">angular2/src/core/di/exceptions.ts (line 93)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/exceptions.ts#L92-L123">angular2/src/core/di/exceptions.ts (line 92)</a>
:markdown :markdown
Starting point to import all public core APIs. Thrown when a constructing type returns with an Error.
The `InstantiationError` class contains the original error plus the dependency graph which caused
this object to be instantiated.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -20,10 +25,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 name h3#keys keys
:markdown :markdown
@ -32,10 +35,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 keys h3#injectors injectors
:markdown :markdown
@ -44,22 +45,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 injectors h3#addKey addKey
:markdown
.l-sub-section
h3 addKey
pre.prettyprint pre.prettyprint
@ -72,10 +59,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 wrapperMessage h3#wrapperMessage wrapperMessage
:markdown :markdown
@ -84,10 +69,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 causeKey h3#causeKey causeKey
:markdown :markdown
@ -96,10 +79,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 context h3#context context
:markdown :markdown
@ -107,5 +88,3 @@ p.location-badge.

View File

@ -1,14 +1,17 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/exceptions.ts#L125-L140">angular2/src/core/di/exceptions.ts (line 125)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/exceptions.ts#L123-L134">angular2/src/core/di/exceptions.ts (line 123)</a>
:markdown :markdown
Starting point to import all public core APIs. Thrown when an object other then <a href='Binding-class.html'><code>Binding</code></a> (or `Type`) is passed to <a href='Injector-class.html'><code>Injector</code></a>
creation.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -19,33 +22,3 @@ p.location-badge.
.l-sub-section
h3 message
:markdown
.l-sub-section
h3 toString
pre.prettyprint
code.
toString()
:markdown

View File

@ -4,11 +4,10 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/change_detection/differs/iterable_differs.ts#L5-L10">angular2/src/core/change_detection/differs/iterable_differs.ts (line 5)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/change_detection/differs/iterable_differs.ts#L5-L10">angular2/src/core/change_detection/differs/iterable_differs.ts (line 5)</a>
:markdown :markdown
Starting point to import all public core APIs.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 diff h3#diff diff
pre.prettyprint pre.prettyprint
@ -21,10 +20,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 onDestroy h3#onDestroy onDestroy
pre.prettyprint pre.prettyprint
@ -36,5 +33,3 @@ p.location-badge.

View File

@ -4,11 +4,13 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/change_detection/differs/iterable_differs.ts#L10-L18">angular2/src/core/change_detection/differs/iterable_differs.ts (line 10)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/change_detection/differs/iterable_differs.ts#L10-L18">angular2/src/core/change_detection/differs/iterable_differs.ts (line 10)</a>
:markdown :markdown
Starting point to import all public core APIs. Provides a factory for <a href='IterableDiffer-interface.html'><code>IterableDiffer</code></a>.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 supports h3#supports supports
pre.prettyprint pre.prettyprint
@ -21,10 +23,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 create h3#create create
pre.prettyprint pre.prettyprint
@ -36,5 +36,3 @@ p.location-badge.

View File

@ -4,7 +4,9 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/change_detection/differs/iterable_differs.ts#L18-L81">angular2/src/core/change_detection/differs/iterable_differs.ts (line 18)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/change_detection/differs/iterable_differs.ts#L18-L81">angular2/src/core/change_detection/differs/iterable_differs.ts (line 18)</a>
:markdown :markdown
Starting point to import all public core APIs. A repository of different iterable diffing strategies used by NgFor, NgClass, and others.
.l-main-section .l-main-section
h2 Annotations h2 Annotations
@ -18,7 +20,7 @@ p.location-badge.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -30,10 +32,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 factories h3#factories factories
:markdown :markdown
@ -42,10 +42,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 find h3#find find
pre.prettyprint pre.prettyprint
@ -57,5 +55,3 @@ p.location-badge.

View File

@ -4,7 +4,29 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/pipes/json_pipe.ts#L4-L34">angular2/src/core/pipes/json_pipe.ts (line 4)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/pipes/json_pipe.ts#L4-L34">angular2/src/core/pipes/json_pipe.ts (line 4)</a>
:markdown :markdown
Starting point to import all public core APIs. Implements json transforms to any object.
# Example
In this example we transform the user object to json.
```
@Component({
selector: "user-cmp"
})
@View({
template: "User: {{ user | json }}"
})
class Username {
user:Object
constructor() {
this.user = { name: "PatrickJS" };
}
}
```
.l-main-section .l-main-section
h2 Annotations h2 Annotations
@ -25,7 +47,7 @@ p.location-badge.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 transform h3#transform transform
pre.prettyprint pre.prettyprint
@ -37,5 +59,3 @@ p.location-badge.

View File

@ -4,11 +4,20 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/key.ts#L7-L37">angular2/src/core/di/key.ts (line 7)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/key.ts#L7-L37">angular2/src/core/di/key.ts (line 7)</a>
:markdown :markdown
Starting point to import all public core APIs. A unique object used for retrieving items from the <a href='Injector-class.html'><code>Injector</code></a>.
Keys have:
- a system-wide unique `id`.
- a `token`, usually the `Type` of the instance.
Keys are used internally by the <a href='Injector-class.html'><code>Injector</code></a> because their system-wide unique `id`s allow the
injector to index in arrays rather than looking up items in maps.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -20,10 +29,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 token h3#token token
:markdown :markdown
@ -32,10 +39,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 id h3#id id
:markdown :markdown
@ -44,10 +49,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 displayName h3#displayName displayName
:markdown :markdown
@ -55,5 +58,3 @@ p.location-badge.

View File

@ -4,11 +4,10 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/key.ts#L37-L65">angular2/src/core/di/key.ts (line 37)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/key.ts#L37-L65">angular2/src/core/di/key.ts (line 37)</a>
:markdown :markdown
Starting point to import all public core APIs.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 get h3#get get
pre.prettyprint pre.prettyprint
@ -21,10 +20,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 numberOfKeys h3#numberOfKeys numberOfKeys
:markdown :markdown
@ -32,5 +29,3 @@ p.location-badge.

View File

@ -4,11 +4,10 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/change_detection/differs/keyvalue_differs.ts#L5-L10">angular2/src/core/change_detection/differs/keyvalue_differs.ts (line 5)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/change_detection/differs/keyvalue_differs.ts#L5-L10">angular2/src/core/change_detection/differs/keyvalue_differs.ts (line 5)</a>
:markdown :markdown
Starting point to import all public core APIs.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 diff h3#diff diff
pre.prettyprint pre.prettyprint
@ -21,10 +20,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 onDestroy h3#onDestroy onDestroy
pre.prettyprint pre.prettyprint
@ -36,5 +33,3 @@ p.location-badge.

View File

@ -4,11 +4,13 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/change_detection/differs/keyvalue_differs.ts#L10-L18">angular2/src/core/change_detection/differs/keyvalue_differs.ts (line 10)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/change_detection/differs/keyvalue_differs.ts#L10-L18">angular2/src/core/change_detection/differs/keyvalue_differs.ts (line 10)</a>
:markdown :markdown
Starting point to import all public core APIs. Provides a factory for <a href='KeyValueDiffer-interface.html'><code>KeyValueDiffer</code></a>.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 supports h3#supports supports
pre.prettyprint pre.prettyprint
@ -21,10 +23,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 create h3#create create
pre.prettyprint pre.prettyprint
@ -36,5 +36,3 @@ p.location-badge.

View File

@ -4,7 +4,9 @@ p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/change_detection/differs/keyvalue_differs.ts#L18-L81">angular2/src/core/change_detection/differs/keyvalue_differs.ts (line 18)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/change_detection/differs/keyvalue_differs.ts#L18-L81">angular2/src/core/change_detection/differs/keyvalue_differs.ts (line 18)</a>
:markdown :markdown
Starting point to import all public core APIs. A repository of different Map diffing strategies used by NgClass, NgStyle, and others.
.l-main-section .l-main-section
h2 Annotations h2 Annotations
@ -18,7 +20,7 @@ p.location-badge.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -30,10 +32,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 factories h3#factories factories
:markdown :markdown
@ -42,10 +42,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 find h3#find find
pre.prettyprint pre.prettyprint
@ -57,5 +55,3 @@ p.location-badge.

View File

@ -1,10 +1,35 @@
p.location-badge. p.location-badge.
exported from <a href='../core'>angular2/core</a> exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/life_cycle/life_cycle.ts#L6-L90">angular2/src/core/life_cycle/life_cycle.ts (line 6)</a> defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/life_cycle/life_cycle.ts#L6-L92">angular2/src/core/life_cycle/life_cycle.ts (line 6)</a>
:markdown :markdown
Starting point to import all public core APIs. Provides access to explicitly trigger change detection in an application.
By default, `Zone` triggers change detection in Angular on each virtual machine (VM) turn. When
testing, or in some
limited application use cases, a developer can also trigger change detection with the
`lifecycle.tick()` method.
Each Angular application has a single `LifeCycle` instance.
# Example
This is a contrived example, since the bootstrap automatically runs inside of the `Zone`, which
invokes
`lifecycle.tick()` on your behalf.
```javascript
bootstrap(MyApp).then((ref:ComponentRef) => {
var lifeCycle = ref.injector.get(LifeCycle);
var myApp = ref.instance;
ref.doSomething();
lifecycle.tick();
});
```
.l-main-section .l-main-section
h2 Annotations h2 Annotations
@ -18,7 +43,7 @@ p.location-badge.
.l-main-section .l-main-section
h2 Members h2 Members
.l-sub-section .l-sub-section
h3 constructor h3#constructor constructor
pre.prettyprint pre.prettyprint
@ -30,10 +55,8 @@ p.location-badge.
.l-sub-section .l-sub-section
h3 tick h3#tick tick
pre.prettyprint pre.prettyprint

Some files were not shown because too many files have changed in this diff Show More