added updated api content
This commit is contained in:
parent
1b3beb1a2e
commit
79d0a5022e
@ -37,7 +37,7 @@ nav.side-nav.l-pinned-left.l-layer-4.l-offset-nav
|
|||||||
li(class="#{selected}") <a href="/docs/#{current.path[1]}/#{current.path[2]}/#{current.path[3]}/#{slug}.html" md-button>#{num}. #{page.title}</a>
|
li(class="#{selected}") <a href="/docs/#{current.path[1]}/#{current.path[2]}/#{current.path[3]}/#{slug}.html" md-button>#{num}. #{page.title}</a>
|
||||||
|
|
||||||
else
|
else
|
||||||
li(class="#{selected}") <a href="/docs/#{current.path[1]}/#{current.path[2]}/#{current.path[3]}/#{slug}.html" md-button>#{slug}</a>
|
li(class="#{selected}") <a href="/docs/#{current.path[1]}/#{current.path[2]}/#{current.path[3]}/#{slug}.html" md-button>#{page.title}</a>
|
||||||
|
|
||||||
|
|
||||||
// TERTIARY NAVIGATION
|
// TERTIARY NAVIGATION
|
||||||
|
@ -12,15 +12,15 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"di" : {
|
"di" : {
|
||||||
"title" : "Di"
|
"title" : "Dependency Injection (DI)"
|
||||||
},
|
},
|
||||||
|
|
||||||
"di_annotations" : {
|
"di_annotations" : {
|
||||||
"title" : "Di Annotations"
|
"title" : "DI Annotations"
|
||||||
},
|
},
|
||||||
|
|
||||||
"di_errors" : {
|
"di_errors" : {
|
||||||
"title" : "Di Errors"
|
"title" : "DI Errors"
|
||||||
},
|
},
|
||||||
|
|
||||||
"directives" : {
|
"directives" : {
|
||||||
@ -35,18 +35,10 @@
|
|||||||
"title" : "Pipes"
|
"title" : "Pipes"
|
||||||
},
|
},
|
||||||
|
|
||||||
"template" : {
|
|
||||||
"title" : "Template"
|
|
||||||
},
|
|
||||||
|
|
||||||
"test" : {
|
"test" : {
|
||||||
"title" : "Test"
|
"title" : "Test"
|
||||||
},
|
},
|
||||||
|
|
||||||
"test_lib" : {
|
|
||||||
"title" : "Test Lib"
|
|
||||||
},
|
|
||||||
|
|
||||||
"view" : {
|
"view" : {
|
||||||
"title" : "View"
|
"title" : "View"
|
||||||
}
|
}
|
||||||
|
1
public/docs/js/latest/api/angular2/_data.json
Normal file
1
public/docs/js/latest/api/angular2/_data.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{}
|
1
public/docs/js/latest/api/angular2_sfx/_data.json
Normal file
1
public/docs/js/latest/api/angular2_sfx/_data.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{}
|
@ -63,8 +63,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
()
|
constructor()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -37,8 +37,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(attributeName)
|
constructor(attributeName)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
p.
|
p.
|
||||||
<span class="location-badge">exported from <a href="/angular2/annotations">angular2/annotations</a></span>
|
<span class="location-badge">exported from <a href="/angular2/annotations">angular2/annotations</a></span>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/annotations/annotations.js#L750">angular2/src/core/annotations/annotations.js (line 750)</a>
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/annotations/annotations.js#L756">angular2/src/core/annotations/annotations.js (line 756)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Directive that attaches behavior to DOM elements.
|
Directive that attaches behavior to DOM elements.
|
||||||
@ -10,10 +10,10 @@ p.
|
|||||||
(see: http://en.wikipedia.org/wiki/Composition_over_inheritance)
|
(see: http://en.wikipedia.org/wiki/Composition_over_inheritance)
|
||||||
|
|
||||||
Decorators:
|
Decorators:
|
||||||
- are simplest form of [Directive]s.
|
- are simplest form of <a href="angular2/annotations/Directive-class"><code>Directive</code></a>s.
|
||||||
- are best used as a composition pattern ()
|
- are best used as a composition pattern ()
|
||||||
|
|
||||||
Decorators differ from [Component]s in that they:
|
Decorators differ from <a href="angular2/annotations/Component-class"><code>Component</code></a>s in that they:
|
||||||
- can have multiple decorators per element
|
- can have multiple decorators per element
|
||||||
- do not create their own evaluation context
|
- do not create their own evaluation context
|
||||||
- do not have a template (and therefor do not create Shadow DOM)
|
- do not have a template (and therefor do not create Shadow DOM)
|
||||||
@ -69,7 +69,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
({
|
constructor({
|
||||||
selector,
|
selector,
|
||||||
properties,
|
properties,
|
||||||
events,
|
events,
|
||||||
@ -84,7 +84,6 @@ p.
|
|||||||
lifecycle:List,
|
lifecycle:List,
|
||||||
compileChildren:boolean
|
compileChildren:boolean
|
||||||
}={})
|
}={})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
p.
|
p.
|
||||||
<span class="location-badge">exported from <a href="/angular2/annotations">angular2/annotations</a></span>
|
<span class="location-badge">exported from <a href="/angular2/annotations">angular2/annotations</a></span>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/annotations/annotations.js#L655">angular2/src/core/annotations/annotations.js (line 655)</a>
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/annotations/annotations.js#L661">angular2/src/core/annotations/annotations.js (line 661)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Directive used for dynamically loading components.
|
Directive used for dynamically loading components.
|
||||||
@ -56,7 +56,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
({
|
constructor({
|
||||||
selector,
|
selector,
|
||||||
properties,
|
properties,
|
||||||
events,
|
events,
|
||||||
@ -71,7 +71,6 @@ p.
|
|||||||
injectables:List,
|
injectables:List,
|
||||||
lifecycle:List
|
lifecycle:List
|
||||||
}={})
|
}={})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -86,7 +85,7 @@ p.
|
|||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Same as [Component.injectables].
|
Same as `injectables` in the <a href="angular2/annotations/Component-class"><code>Component</code></a>.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -50,8 +50,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
()
|
constructor()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -18,8 +18,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(propName)
|
constructor(propName)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -4,9 +4,9 @@ p.
|
|||||||
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/annotations/di.js#L77">angular2/src/core/annotations/di.js (line 77)</a>
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/annotations/di.js#L77">angular2/src/core/annotations/di.js (line 77)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Specifies that a [QueryList] should be injected.
|
Specifies that a <a href="angular2/view/QueryList-class"><code>QueryList</code></a> should be injected.
|
||||||
|
|
||||||
See: [QueryList] for usage and example.
|
See <a href="angular2/view/QueryList-class"><code>QueryList</code></a> for usage and example.
|
||||||
|
|
||||||
.l-main-section
|
.l-main-section
|
||||||
h2 Members
|
h2 Members
|
||||||
@ -16,8 +16,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(directive)
|
constructor(directive)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -4,7 +4,7 @@ p.
|
|||||||
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/annotations/view.js#L34">angular2/src/core/annotations/view.js (line 34)</a>
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/annotations/view.js#L34">angular2/src/core/annotations/view.js (line 34)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Declare the available HTML templates for an application.
|
Declares the available HTML templates for an application.
|
||||||
|
|
||||||
Each angular component requires a single `@Component` and at least one `@View` annotation. The @View
|
Each angular component requires a single `@Component` and at least one `@View` annotation. The @View
|
||||||
annotation specifies the HTML template to use, and lists the directives that are active within the template.
|
annotation specifies the HTML template to use, and lists the directives that are active within the template.
|
||||||
@ -12,7 +12,7 @@ p.
|
|||||||
When a component is instantiated, the template is loaded into the component's shadow root, and the
|
When a component is instantiated, the template is loaded into the component's shadow root, and the
|
||||||
expressions and statements in the template are evaluated against the component.
|
expressions and statements in the template are evaluated against the component.
|
||||||
|
|
||||||
For details on the `@Component` annotation, see [Component].
|
For details on the `@Component` annotation, see <a href="angular2/annotations/Component-class"><code>Component</code></a>.
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
({
|
constructor({
|
||||||
templateUrl,
|
templateUrl,
|
||||||
template,
|
template,
|
||||||
directives
|
directives
|
||||||
@ -50,7 +50,6 @@ p.
|
|||||||
template: string,
|
template: string,
|
||||||
directives: List<Type>
|
directives: List<Type>
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -65,7 +64,7 @@ p.
|
|||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Specify a list of directives that are active within a template. [TODO: true?]
|
Specifies a list of directives that can be used within a template.
|
||||||
|
|
||||||
Directives must be listed explicitly to provide proper component encapsulation.
|
Directives must be listed explicitly to provide proper component encapsulation.
|
||||||
|
|
||||||
@ -96,7 +95,7 @@ p.
|
|||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Specify an inline template for an angular component.
|
Specifies an inline template for an angular component.
|
||||||
|
|
||||||
NOTE: either `templateURL` or `template` should be used, but not both.
|
NOTE: either `templateURL` or `template` should be used, but not both.
|
||||||
|
|
||||||
@ -110,7 +109,7 @@ p.
|
|||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Specify a template URL for an angular component.
|
Specifies a template URL for an angular component.
|
||||||
|
|
||||||
NOTE: either `templateURL` or `template` should be used, but not both.
|
NOTE: either `templateURL` or `template` should be used, but not both.
|
||||||
|
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
|
|
||||||
p.
|
p.
|
||||||
<span class="location-badge">exported from <a href="/angular2/annotations">angular2/annotations</a></span>
|
<span class="location-badge">exported from <a href="/angular2/annotations">angular2/annotations</a></span>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/annotations/annotations.js#L879">angular2/src/core/annotations/annotations.js (line 879)</a>
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/annotations/annotations.js#L885">angular2/src/core/annotations/annotations.js (line 885)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Directive that controls the instantiation, destruction, and positioning of inline template elements.
|
Directive that controls the instantiation, destruction, and positioning of inline template elements.
|
||||||
|
|
||||||
A viewport directive uses a [ViewContainer] to instantiate, insert, move, and destroy views at runtime.
|
A viewport directive uses a <a href="angular2/view/ViewContainer-class"><code>ViewContainer</code></a> to instantiate, insert, move, and destroy views at runtime.
|
||||||
The [ViewContainer] is created as a result of `<template>` element, and represents a location in the current view
|
The <a href="angular2/view/ViewContainer-class"><code>ViewContainer</code></a> is created as a result of `<template>` element, and represents a location in the current view
|
||||||
where these actions are performed.
|
where these actions are performed.
|
||||||
|
|
||||||
Views are always created as children of the current [View], and as siblings of the `<template>` element. Thus a
|
Views are always created as children of the current <a href="angular2/annotations/View-class"><code>View</code></a>, and as siblings of the `<template>` element. Thus a
|
||||||
directive in a child view cannot inject the viewport directive that created it.
|
directive in a child view cannot inject the viewport directive that created it.
|
||||||
|
|
||||||
Since viewport directives are common in Angular, and using the full `<template>` element syntax is wordy, Angular
|
Since viewport directives are common in Angular, and using the full `<template>` element syntax is wordy, Angular
|
||||||
@ -48,7 +48,7 @@ p.
|
|||||||
@Viewport({
|
@Viewport({
|
||||||
selector: '[unless]',
|
selector: '[unless]',
|
||||||
properties: {
|
properties: {
|
||||||
'condition': 'unless'
|
'unless': 'unless'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
export class Unless {
|
export class Unless {
|
||||||
@ -60,7 +60,7 @@ p.
|
|||||||
this.prevCondition = null;
|
this.prevCondition = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
set condition(newCondition) {
|
set unless(newCondition) {
|
||||||
if (newCondition && (isBlank(this.prevCondition) || !this.prevCondition)) {
|
if (newCondition && (isBlank(this.prevCondition) || !this.prevCondition)) {
|
||||||
this.prevCondition = true;
|
this.prevCondition = true;
|
||||||
this.viewContainer.clear();
|
this.viewContainer.clear();
|
||||||
@ -102,7 +102,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
({
|
constructor({
|
||||||
selector,
|
selector,
|
||||||
properties,
|
properties,
|
||||||
events,
|
events,
|
||||||
@ -114,7 +114,6 @@ p.
|
|||||||
events:List,
|
events:List,
|
||||||
lifecycle:List
|
lifecycle:List
|
||||||
}={})
|
}={})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
p.
|
p.
|
||||||
<span class="location-badge">exported from <a href="/angular2/annotations">angular2/annotations</a></span>
|
<span class="location-badge">exported from <a href="/angular2/annotations">angular2/annotations</a></span>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/annotations/annotations.js#L516">angular2/src/core/annotations/annotations.js (line 516)</a>
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/annotations/annotations.js#L522">angular2/src/core/annotations/annotations.js (line 522)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Declare reusable UI building blocks for an application.
|
Declare reusable UI building blocks for an application.
|
||||||
@ -12,11 +12,11 @@ p.
|
|||||||
When a component is instantiated, Angular
|
When a component is instantiated, Angular
|
||||||
- creates a shadow DOM for the component.
|
- creates a shadow DOM for the component.
|
||||||
- loads the selected template into the shadow DOM.
|
- loads the selected template into the shadow DOM.
|
||||||
- creates a child [Injector] which is configured with the [Component.injectables].
|
- creates a child <a href="angular2/di/Injector-class"><code>Injector</code></a> which is configured with the `injectables` for the <a href="angular2/annotations/Component-class"><code>Component</code></a>.
|
||||||
|
|
||||||
All template expressions and statements are then evaluated against the component instance.
|
All template expressions and statements are then evaluated against the component instance.
|
||||||
|
|
||||||
For details on the `@View` annotation, see [View].
|
For details on the `@View` annotation, see <a href="angular2/annotations/View-class"><code>View</code></a>.
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
({
|
constructor({
|
||||||
selector,
|
selector,
|
||||||
properties,
|
properties,
|
||||||
events,
|
events,
|
||||||
@ -61,7 +61,6 @@ p.
|
|||||||
lifecycle:List,
|
lifecycle:List,
|
||||||
changeDetection:string
|
changeDetection:string
|
||||||
}={})
|
}={})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -96,17 +95,17 @@ p.
|
|||||||
:markdown
|
:markdown
|
||||||
Defines the set of injectable objects that are visible to a Component and its children.
|
Defines the set of injectable objects that are visible to a Component and its children.
|
||||||
|
|
||||||
The [injectables] defined in the Component annotation allow you to configure a set of bindings for the component's
|
The `injectables` defined in the Component annotation allow you to configure a set of bindings for the component's
|
||||||
injector.
|
injector.
|
||||||
|
|
||||||
When a component is instantiated, Angular creates a new child Injector, which is configured with the bindings in
|
When a component is instantiated, Angular creates a new child Injector, which is configured with the bindings in
|
||||||
the Component [injectables] annotation. The injectable objects then become available for injection to the component
|
the Component `injectables` annotation. The injectable objects then become available for injection to the component
|
||||||
itself and any of the directives in the component's template, i.e. they are not available to the directives which
|
itself and any of the directives in the component's template, i.e. they are not available to the directives which
|
||||||
are children in the component's light DOM.
|
are children in the component's light DOM.
|
||||||
|
|
||||||
|
|
||||||
The syntax for configuring the [injectables] injectable is identical to [Injector] injectable configuration. See
|
The syntax for configuring the `injectables` injectable is identical to <a href="angular2/di/Injector-class"><code>Injector</code></a> injectable configuration.
|
||||||
[Injector] for additional detail.
|
See <a href="angular2/di/Injector-class"><code>Injector</code></a> for additional detail.
|
||||||
|
|
||||||
|
|
||||||
## Simple Example
|
## Simple Example
|
||||||
|
@ -1,37 +1,37 @@
|
|||||||
|
|
||||||
p.
|
p.
|
||||||
<span class="location-badge">exported from <a href="/angular2/annotations">angular2/annotations</a></span>
|
<span class="location-badge">exported from <a href="/angular2/annotations">angular2/annotations</a></span>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/annotations/annotations.js#L238">angular2/src/core/annotations/annotations.js (line 238)</a>
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/annotations/annotations.js#L241">angular2/src/core/annotations/annotations.js (line 241)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Directives allow you to attach behavior to elements in the DOM.
|
Directives allow you to attach behavior to elements in the DOM.
|
||||||
|
|
||||||
Directive is an abstract concept, instead use concrete directives: [Component], [DynamicComponent], [Decorator]
|
Directive is an abstract concept, instead use concrete directives: <a href="angular2/annotations/Component-class"><code>Component</code></a>, <a href="angular2/annotations/DynamicComponent-class"><code>DynamicComponent</code></a>, <a href="angular2/annotations/Decorator-class"><code>Decorator</code></a>
|
||||||
or [Viewport].
|
or <a href="angular2/annotations/Viewport-class"><code>Viewport</code></a>.
|
||||||
|
|
||||||
A directive consists of a single directive annotation and a controller class. When the directive's [selector] matches
|
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:
|
elements in the DOM, the following steps occur:
|
||||||
|
|
||||||
1. For each directive, the [ElementInjector] attempts to resolve the directive's constructor arguments.
|
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,
|
2. Angular instantiates directives for each matched element using `ElementInjector` in a depth-first order,
|
||||||
as declared in the HTML.
|
as declared in the HTML.
|
||||||
|
|
||||||
## Understanding How Injection Works
|
## Understanding How Injection Works
|
||||||
|
|
||||||
There are three stages of injection resolution.
|
There are three stages of injection resolution.
|
||||||
- *Pre-existing Injectors*:
|
- *Pre-existing Injectors*:
|
||||||
- The terminal [Injector] cannot resolve dependencies. It either throws an error or, if the dependency was
|
- The terminal <a href="angular2/di/Injector-class"><code>Injector</code></a> cannot resolve dependencies. It either throws an error or, if the dependency was
|
||||||
specified as `@Optional`, returns `null`.
|
specified as `@Optional`, returns `null`.
|
||||||
- The primordial injector resolves browser singleton resources, such as: cookies, title, location, and others.
|
- The platform injector resolves browser singleton resources, such as: cookies, title, location, and others.
|
||||||
- *Component Injectors*: Each `@Component` has its own [Injector], and they follow the same parent-child hierarchy
|
- *Component Injectors*: Each `@Component` has its own <a href="angular2/di/Injector-class"><code>Injector</code></a>, and they follow the same parent-child hierarchy
|
||||||
as the components in the DOM.
|
as the components in the DOM.
|
||||||
- *Element Injectors*: Each component has a Shadow DOM. Within the Shadow DOM each element has an [ElementInjector]
|
- *Element Injectors*: Each component 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.
|
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
|
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.
|
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 [View]:
|
Angular then resolves dependencies as follows, according to the order in which they appear in the <a href="angular2/annotations/View-class"><code>View</code></a>:
|
||||||
|
|
||||||
1. Dependencies on the current element
|
1. Dependencies on the current element
|
||||||
2. Dependencies on element injectors and their parents until it encounters a Shadow DOM boundary
|
2. Dependencies on element injectors and their parents until it encounters a Shadow DOM boundary
|
||||||
@ -39,21 +39,21 @@ p.
|
|||||||
4. Dependencies on pre-existing injectors
|
4. Dependencies on pre-existing injectors
|
||||||
|
|
||||||
|
|
||||||
The [ElementInjector] can inject other directives, element-specific special objects, or it can delegate to the parent
|
The `ElementInjector` can inject other directives, element-specific special objects, or it can delegate to the parent
|
||||||
injector.
|
injector.
|
||||||
|
|
||||||
To inject other directives, declare the constructor parameter as:
|
To inject other directives, declare the constructor parameter as:
|
||||||
- `directive:DirectiveType`: a directive on the current element only
|
- `directive:DirectiveType`: a directive on the current element only
|
||||||
- `@Ancestor() directive:DirectiveType`: any directive that matches the type between the current element and the
|
- `@Ancestor() directive:DirectiveType`: any directive that matches the type between the current element and the
|
||||||
Shadow DOM root. Current element is not included in the resolution, therefor even if it could resolve it, it will
|
Shadow DOM root. Current element is not included in the resolution, therefore even if it could resolve it, it will
|
||||||
be ignored.
|
be ignored.
|
||||||
- `@Parent() directive:DirectiveType`: any directive that matches the type on a direct parent element only.
|
- `@Parent() directive:DirectiveType`: any directive that matches the type on a direct parent element only.
|
||||||
- `@Children query:Query<DirectiveType>`: A live collection of direct child directives [TO BE IMPLEMENTED].
|
- `@Children query:Query<DirectiveType>`: A live collection of direct child directives (will be implemented in later release).
|
||||||
- `@Descendants query:Query<DirectiveType>`: A live collection of any child directives [TO BE IMPLEMENTED].
|
- `@Descendants query:Query<DirectiveType>`: A live collection of any child directives (will be implemented in later relaese).
|
||||||
|
|
||||||
To inject element-specific special objects, declare the constructor parameter as:
|
To inject element-specific special objects, declare the constructor parameter as:
|
||||||
- `element: NgElement` to obtain a DOM element (DEPRECATED: replacement coming)
|
- `element: NgElement` to obtain a DOM element (DEPRECATED: replacement coming)
|
||||||
- `viewContainer: ViewContainer` to control child template instantiation, for [Viewport] directives only
|
- `viewContainer: ViewContainer` to control child template instantiation, for <a href="angular2/annotations/Viewport-class"><code>Viewport</code></a> directives only
|
||||||
- `bindingPropagation: BindingPropagation` to control change detection in a more granular way.
|
- `bindingPropagation: BindingPropagation` to control change detection in a more granular way.
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
@ -182,32 +182,35 @@ p.
|
|||||||
`dependency="1"`.
|
`dependency="1"`.
|
||||||
|
|
||||||
|
|
||||||
### Injecting a live collection of direct child directives [PENDING IMPLEMENTATION]
|
### Injecting a live collection of direct child directives
|
||||||
|
|
||||||
|
|
||||||
A directive can also query for other child directives. Since parent directives are instantiated before child
|
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 asynchronously
|
directives, a directive can't simply inject the list of child directives. Instead, the directive
|
||||||
injects a [Query], which updates as children are added, removed, or moved by any [ViewPort] directive such as a
|
injects a <a href="angular2/view/QueryList-class"><code>QueryList</code></a>, which updates its contents as children are added, removed, or moved by any
|
||||||
`for`, an `if`, or a `switch`.
|
<a href="angular2/annotations/Viewport-class"><code>Viewport</code></a> directive such as a `for`, an `if`, or a `switch`.
|
||||||
|
|
||||||
```
|
```
|
||||||
@Decorator({ selector: '[my-directive]' })
|
@Decorator({ selector: '[my-directive]' })
|
||||||
class MyDirective {
|
class MyDirective {
|
||||||
constructor(@Children() dependencies:Query<Maker>) {
|
constructor(@Query(Marker) dependencies:QueryList<Maker>) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
This directive would be instantiated with a [Query] which contains `Dependency` 4 and 6. Here, `Dependency` 5 would
|
This directive would be instantiated with a <a href="angular2/view/QueryList-class"><code>QueryList</code></a> which contains `Dependency` 4 and 6. Here, `Dependency`
|
||||||
not be included, because it is not a direct child.
|
5 would not be included, because it is not a direct child.
|
||||||
|
|
||||||
### Injecting a live collection of direct descendant directives [PENDING IMPLEMENTATION]
|
### Injecting a live collection of descendant directives
|
||||||
|
|
||||||
|
Note: This is will be implemented in later release. ()
|
||||||
|
|
||||||
Similar to `@Children` above, but also includes the children of the child elements.
|
Similar to `@Children` above, but also includes the children of the child elements.
|
||||||
|
|
||||||
```
|
```
|
||||||
@Decorator({ selector: '[my-directive]' })
|
@Decorator({ selector: '[my-directive]' })
|
||||||
class MyDirective {
|
class MyDirective {
|
||||||
constructor(@Children() dependencies:Query<Maker>) {
|
constructor(@QueryDescendents(Marker) dependencies:QueryList<Maker>) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -239,7 +242,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
({
|
constructor({
|
||||||
selector,
|
selector,
|
||||||
properties,
|
properties,
|
||||||
events,
|
events,
|
||||||
@ -252,7 +255,6 @@ p.
|
|||||||
hostListeners: any,
|
hostListeners: any,
|
||||||
lifecycle:List
|
lifecycle:List
|
||||||
}={})
|
}={})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -298,14 +300,13 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(hook:string)
|
hasLifecycleHook(hook:string)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Returns true if a directive participates in a given [LifecycleEvent].
|
Returns true if a directive participates in a given `LifecycleEvent`.
|
||||||
|
|
||||||
See: [onChange], [onDestroy], [onAllChangesDone] for details.
|
See <a href="angular2/annotations/onChange-var"><code>onChange</code></a>, <a href="angular2/annotations/onDestroy-var"><code>onDestroy</code></a>, <a href="angular2/annotations/onAllChangesDone-var"><code>onAllChangesDone</code></a> for details.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -323,6 +324,7 @@ p.
|
|||||||
|
|
||||||
- `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 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.
|
||||||
The target can be `window`, `document` or `body`.
|
The target can be `window`, `document` or `body`.
|
||||||
@ -330,7 +332,7 @@ p.
|
|||||||
When writing a directive event binding, you can also refer to the following local variables:
|
When writing a directive event binding, you can also refer to the following local variables:
|
||||||
- `$event`: Current event object which triggered the event.
|
- `$event`: Current event object which triggered the event.
|
||||||
- `$target`: The source of the event. This will be either a DOM element or an Angular directive.
|
- `$target`: The source of the event. This will be either a DOM element or an Angular directive.
|
||||||
[TO BE IMPLEMENTED]
|
(will be implemented in later release)
|
||||||
|
|
||||||
|
|
||||||
## Syntax
|
## Syntax
|
||||||
@ -380,7 +382,7 @@ p.
|
|||||||
:markdown
|
:markdown
|
||||||
Specifies a set of lifecycle hostListeners in which the directive participates.
|
Specifies a set of lifecycle hostListeners in which the directive participates.
|
||||||
|
|
||||||
See: [onChange], [onDestroy], [onAllChangesDone] for details.
|
See <a href="angular2/annotations/onChange-var"><code>onChange</code></a>, <a href="angular2/annotations/onDestroy-var"><code>onDestroy</code></a>, <a href="angular2/annotations/onAllChangesDone-var"><code>onAllChangesDone</code></a> for details.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -400,7 +402,7 @@ p.
|
|||||||
- `directiveProperty` specifies the component property where the value is written.
|
- `directiveProperty` specifies the component property where the value is written.
|
||||||
- `bindingProperty` specifies the DOM property where the value is read from.
|
- `bindingProperty` specifies the DOM property where the value is read from.
|
||||||
|
|
||||||
You can include [Pipes] when specifying a `bindingProperty` to allow for data transformation and structural
|
You can include a <a href="angular2/pipes/Pipe-class"><code>Pipe</code></a> when specifying a `bindingProperty` to allow for data transformation and structural
|
||||||
change detection of the value. These pipes will be evaluated in the context of this component.
|
change detection of the value. These pipes will be evaluated in the context of this component.
|
||||||
|
|
||||||
|
|
||||||
@ -454,7 +456,9 @@ p.
|
|||||||
You can also use pipes when writing binding definitions for a directive.
|
You can also use pipes when writing binding definitions for a directive.
|
||||||
|
|
||||||
For example, we could write a binding that updates the directive on structural changes, rather than on reference
|
For example, we could write a binding that updates the directive on structural changes, rather than on reference
|
||||||
changes, as normally occurs in change detection. (See: [Pipe] and [keyValueDiff] documentation for more details.)
|
changes, as normally occurs in change detection.
|
||||||
|
|
||||||
|
See <a href="angular2/pipes/Pipe-class"><code>Pipe</code></a> and <a href="angular2/pipes/keyValDiff-var"><code>keyValDiff</code></a> documentation for more details.
|
||||||
|
|
||||||
```
|
```
|
||||||
@Decorator({
|
@Decorator({
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
p(class="module") exported from <a href="/angular2/annotations">angular2/annotations</a>
|
p(class="module") exported from <a href="/angular2/annotations">angular2/annotations</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Notify a directive whenever a [View] that contains it is destroyed.
|
Notify a directive whenever a <a href="angular2/annotations/View-class"><code>View</code></a> that contains it is destroyed.
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
|
@ -8,17 +8,17 @@ p.
|
|||||||
|
|
||||||
Angular implements the following change detection strategies by default:
|
Angular implements the following change detection strategies by default:
|
||||||
|
|
||||||
- [dynamicChangeDetection]: slower, but does not require `eval()`.
|
- <a href="angular2/change_detection/DynamicChangeDetection-class"><code>DynamicChangeDetection</code></a>: slower, but does not require `eval()`.
|
||||||
- [jitChangeDetection]: faster, but requires `eval()`.
|
- <a href="angular2/change_detection/JitChangeDetection-class"><code>JitChangeDetection</code></a>: faster, but requires `eval()`.
|
||||||
|
|
||||||
In JavaScript, you should always use `jitChangeDetection`, unless you are in an environment that has
|
In JavaScript, you should always use `JitChangeDetection`, unless you are in an environment that has
|
||||||
[CSP](https://developer.mozilla.org/en-US/docs/Web/Security/CSP), such as a Chrome Extension.
|
[CSP](https://developer.mozilla.org/en-US/docs/Web/Security/CSP), such as a Chrome Extension.
|
||||||
|
|
||||||
In Dart, use `dynamicChangeDetection` during development. The Angular transformer generates an analog to the
|
In Dart, use `DynamicChangeDetection` during development. The Angular transformer generates an analog to the
|
||||||
`jitChangeDetection` strategy at compile time.
|
`JitChangeDetection` strategy at compile time.
|
||||||
|
|
||||||
|
|
||||||
See: [dynamicChangeDetection], [jitChangeDetection]
|
See: <a href="angular2/change_detection/DynamicChangeDetection-class"><code>DynamicChangeDetection</code></a>, <a href="angular2/change_detection/JitChangeDetection-class"><code>JitChangeDetection</code></a>
|
||||||
|
|
||||||
# Example
|
# Example
|
||||||
```javascript
|
```javascript
|
||||||
@ -32,8 +32,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(name:string, changeControlStrategy:string=DEFAULT)
|
createProtoChangeDetector(name:string, changeControlStrategy:string=DEFAULT)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -6,7 +6,7 @@ p.
|
|||||||
:markdown
|
:markdown
|
||||||
Controls change detection.
|
Controls change detection.
|
||||||
|
|
||||||
[ChangeDetectorRef] allows requesting checks for detectors that rely on observables. It also allows detaching and
|
<a href="angular2/change_detection/ChangeDetectorRef-class"><code>ChangeDetectorRef</code></a> allows requesting checks for detectors that rely on observables. It also allows detaching and
|
||||||
attaching change detector subtrees.
|
attaching change detector subtrees.
|
||||||
|
|
||||||
.l-main-section
|
.l-main-section
|
||||||
@ -17,8 +17,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(cd:ChangeDetector)
|
constructor(cd:ChangeDetector)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -33,8 +32,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
()
|
detach()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -52,8 +50,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
()
|
reattach()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -72,8 +69,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
()
|
requestCheck()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
p.
|
p.
|
||||||
<span class="location-badge">exported from <a href="/angular2/change_detection">angular2/change_detection</a></span>
|
<span class="location-badge">exported from <a href="/angular2/change_detection">angular2/change_detection</a></span>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/change_detection/change_detection.js#L24">angular2/src/change_detection/change_detection.js (line 24)</a>
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/change_detection/change_detection.js#L39">angular2/src/change_detection/change_detection.js (line 39)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
|
||||||
@ -13,8 +13,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(registry:PipeRegistry)
|
constructor(registry:PipeRegistry)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -29,8 +28,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(name:string, changeControlStrategy:string = DEFAULT)
|
createProtoChangeDetector(name:string, changeControlStrategy:string = DEFAULT)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
p.
|
p.
|
||||||
<span class="location-badge">exported from <a href="/angular2/change_detection">angular2/change_detection</a></span>
|
<span class="location-badge">exported from <a href="/angular2/change_detection">angular2/change_detection</a></span>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/change_detection/change_detection.js#L41">angular2/src/change_detection/change_detection.js (line 41)</a>
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/change_detection/change_detection.js#L56">angular2/src/change_detection/change_detection.js (line 56)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
|
||||||
@ -13,8 +13,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(registry:PipeRegistry)
|
constructor(registry:PipeRegistry)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -29,8 +28,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(name:string, changeControlStrategy:string = DEFAULT)
|
createProtoChangeDetector(name:string, changeControlStrategy:string = DEFAULT)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -6,14 +6,14 @@ p.
|
|||||||
:markdown
|
:markdown
|
||||||
Provides access to explicitly trigger change detection in an application.
|
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
|
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.
|
limited application use cases, a developer can also trigger change detection with the `lifecycle.tick()` method.
|
||||||
|
|
||||||
Each Angular application has a single `LifeCycle` instance.
|
Each Angular application has a single `LifeCycle` instance.
|
||||||
|
|
||||||
# Example
|
# Example
|
||||||
|
|
||||||
This is a contrived example, since the bootstrap automatically runs inside of the [Zone], which invokes
|
This is a contrived example, since the bootstrap automatically runs inside of the `Zone`, which invokes
|
||||||
`lifecycle.tick()` on your behalf.
|
`lifecycle.tick()` on your behalf.
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
@ -33,8 +33,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(exceptionHandler:ExceptionHandler, changeDetector:ChangeDetector = null, enforceNoNewChanges:boolean = false)
|
constructor(exceptionHandler:ExceptionHandler, changeDetector:ChangeDetector = null, enforceNoNewChanges:boolean = false)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -49,8 +48,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(zone:VmTurnZone, changeDetector:ChangeDetector = null)
|
registerWith(zone:VmTurnZone, changeDetector:ChangeDetector = null)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -66,8 +64,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
()
|
tick()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -38,8 +38,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(error, stackTrace = null, reason = null)
|
call(error, stackTrace = null, reason = null)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -17,8 +17,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(view, boundElementIndex)
|
constructor(view, boundElementIndex)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -45,8 +44,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(name:string)
|
getAttribute(name:string)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
107
public/docs/js/latest/api/core/VmTurnZone-class.jade
Normal file
107
public/docs/js/latest/api/core/VmTurnZone-class.jade
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
|
||||||
|
p.
|
||||||
|
<span class="location-badge">exported from <a href="/angular2/core">angular2/core</a></span>
|
||||||
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/zone/vm_turn_zone.js#L14">angular2/src/core/zone/vm_turn_zone.js (line 14)</a>
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
A wrapper around zones that lets you schedule tasks after it has executed a task.
|
||||||
|
|
||||||
|
The wrapper maintains an "inner" and "outer" `Zone`. The application code will executes
|
||||||
|
in the "inner" zone unless `runOutsideAngular` is explicitely called.
|
||||||
|
|
||||||
|
A typical application will create a singleton `VmTurnZone` whose outer `Zone` is the root `Zone`
|
||||||
|
and whose default `onTurnDone` runs the Angular digest.
|
||||||
|
|
||||||
|
.l-main-section
|
||||||
|
h2 Members
|
||||||
|
.l-sub-section
|
||||||
|
h3 constructor
|
||||||
|
|
||||||
|
|
||||||
|
pre.prettyprint
|
||||||
|
code.
|
||||||
|
constructor({enableLongStackTrace}, [object Object])
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
Associates with this
|
||||||
|
|
||||||
|
- an "outer" zone, which is the one that created this.
|
||||||
|
- an "inner" zone, which is a child of the outer zone.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3 initCallbacks
|
||||||
|
|
||||||
|
|
||||||
|
pre.prettyprint
|
||||||
|
code.
|
||||||
|
initCallbacks({onTurnStart, onTurnDone, onScheduleMicrotask, onErrorHandler} = {}, [object Object], [object Object], [object Object], [object Object])
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
Initializes the zone hooks.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3 run
|
||||||
|
|
||||||
|
|
||||||
|
pre.prettyprint
|
||||||
|
code.
|
||||||
|
run(fn)
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
Runs `fn` in the inner zone and returns whatever it returns.
|
||||||
|
|
||||||
|
In a typical app where the inner zone is the Angular zone, this allows one to make use of the
|
||||||
|
Angular's auto digest mechanism.
|
||||||
|
|
||||||
|
```
|
||||||
|
var zone: VmTurnZone = <ref to the application zone>;
|
||||||
|
|
||||||
|
zone.run(() => {
|
||||||
|
// auto-digest will run after this function is called from JS
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3 runOutsideAngular
|
||||||
|
|
||||||
|
|
||||||
|
pre.prettyprint
|
||||||
|
code.
|
||||||
|
runOutsideAngular(fn)
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
Runs `fn` in the outer zone and returns whatever it returns.
|
||||||
|
|
||||||
|
In a typical app where the inner zone is the Angular zone, this allows one to escape Angular's
|
||||||
|
auto-digest mechanism.
|
||||||
|
|
||||||
|
```
|
||||||
|
var zone: VmTurnZone = <ref to the application zone>;
|
||||||
|
|
||||||
|
zone.runOusideAngular(() => {
|
||||||
|
element.onClick(() => {
|
||||||
|
// Clicking on the element would not trigger the change detection
|
||||||
|
});
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -9,5 +9,9 @@
|
|||||||
|
|
||||||
"ExceptionHandler-class" : {
|
"ExceptionHandler-class" : {
|
||||||
"title" : "ExceptionHandler Class"
|
"title" : "ExceptionHandler Class"
|
||||||
|
},
|
||||||
|
|
||||||
|
"VmTurnZone-class" : {
|
||||||
|
"title" : "VmTurnZone Class"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -59,10 +59,10 @@
|
|||||||
|
|
||||||
1. It uses the component's `selector` property to locate the DOM element which needs to be upgraded into
|
1. It uses the component's `selector` property to locate the DOM element which needs to be upgraded into
|
||||||
the angular component.
|
the angular component.
|
||||||
2. It creates a new child injector (from the primordial injector) and configures the injector with the component's
|
2. It creates a new child injector (from the platform injector) and configures the injector with the component's
|
||||||
`injectables`. Optionally, you can also override the injector configuration for an app by invoking
|
`injectables`. Optionally, you can also override the injector configuration for an app by invoking
|
||||||
`bootstrap` with the `componentInjectableBindings` argument.
|
`bootstrap` with the `componentInjectableBindings` argument.
|
||||||
3. It creates a new [Zone] and connects it to the angular application's change detection domain instance.
|
3. It creates a new `Zone` and connects it to the angular application's change detection domain instance.
|
||||||
4. It creates a shadow DOM on the selected component's host element and loads the template into it.
|
4. It creates a shadow DOM on the selected component's host element and loads the template into it.
|
||||||
5. It instantiates the specified component.
|
5. It instantiates the specified component.
|
||||||
6. Finally, Angular performs change detection to apply the initial data bindings for the application.
|
6. Finally, Angular performs change detection to apply the initial data bindings for the application.
|
||||||
@ -77,7 +77,7 @@
|
|||||||
|
|
||||||
Angular creates a new application each time that the `bootstrap()` method is invoked. When multiple applications
|
Angular creates a new application each time that the `bootstrap()` method is invoked. When multiple applications
|
||||||
are created for a page, Angular treats each application as independent within an isolated change detection and
|
are created for a page, Angular treats each application as independent within an isolated change detection and
|
||||||
[Zone] domain. If you need to share data between applications, use the strategy described in the next
|
`Zone` domain. If you need to share data between applications, use the strategy described in the next
|
||||||
section, "Applications That Share Change Detection."
|
section, "Applications That Share Change Detection."
|
||||||
|
|
||||||
|
|
||||||
@ -89,25 +89,25 @@
|
|||||||
single change detection zone is created and therefore data can be shared across the applications.
|
single change detection zone is created and therefore data can be shared across the applications.
|
||||||
|
|
||||||
|
|
||||||
## Primordial Injector
|
## Platform Injector
|
||||||
|
|
||||||
When working within a browser window, there are many singleton resources: cookies, title, location, and others.
|
When working within a browser window, there are many singleton resources: cookies, title, location, and others.
|
||||||
Angular services that represent these resources must likewise be shared across all Angular applications that
|
Angular services that represent these resources must likewise be shared across all Angular applications that
|
||||||
occupy the same browser window. For this reason, Angular creates exactly one global primordial injector which stores
|
occupy the same browser window. For this reason, Angular creates exactly one global platform injector which stores
|
||||||
all shared services, and each angular application injector has the primordial injector as its parent.
|
all shared services, and each angular application injector has the platform injector as its parent.
|
||||||
|
|
||||||
Each application has its own private injector as well. When there are multiple applications on a page, Angular treats
|
Each application has its own private injector as well. When there are multiple applications on a page, Angular treats
|
||||||
each application injector's services as private to that application.
|
each application injector's services as private to that application.
|
||||||
|
|
||||||
|
|
||||||
# API
|
# API
|
||||||
- [appComponentType]: The root component which should act as the application. This is a reference to a [Type]
|
- `appComponentType`: The root component which should act as the application. This is a reference to a `Type`
|
||||||
which is annotated with `@Component(...)`.
|
which is annotated with `@Component(...)`.
|
||||||
- [componentInjectableBindings]: An additional set of bindings that can be added to the [Component.injectables] to
|
- `componentInjectableBindings`: An additional set of bindings that can be added to `injectables` for the
|
||||||
override default injection behavior.
|
<a href="angular2/annotations/Component-class"><code>Component</code></a> to override default injection behavior.
|
||||||
- [errorReporter]: `function(exception:any, stackTrace:string)` a default error reporter for unhandled exceptions.
|
- `errorReporter`: `function(exception:any, stackTrace:string)` a default error reporter for unhandled exceptions.
|
||||||
|
|
||||||
Returns a [Promise] with the application`s private [Injector].
|
Returns a `Promise` with the application`s private <a href="angular2/di/Injector-class"><code>Injector</code></a>.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,9 +4,9 @@ p.
|
|||||||
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/binding.js#L49">angular2/src/di/binding.js (line 49)</a>
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/binding.js#L49">angular2/src/di/binding.js (line 49)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Describes how the [Injector] should instantiate a given token.
|
Describes how the <a href="angular2/di/Injector-class"><code>Injector</code></a> should instantiate a given token.
|
||||||
|
|
||||||
See [bind].
|
See <a href="angular2/di/bind-function"><code>bind</code></a>.
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(token, {
|
constructor(token, {
|
||||||
toClass,
|
toClass,
|
||||||
toValue,
|
toValue,
|
||||||
toAlias,
|
toAlias,
|
||||||
@ -34,7 +34,6 @@ p.
|
|||||||
toAsyncFactory,
|
toAsyncFactory,
|
||||||
deps
|
deps
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -49,8 +48,8 @@ p.
|
|||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Used in conjunction with `toFactory` or `toAsyncFactory` and specifies the `token`s which should be injected
|
Used in conjunction with `toFactory` or `toAsyncFactory` and specifies a set of dependencies (as `token`s) which
|
||||||
into the factory function.
|
should be injected into the factory function.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -75,12 +74,13 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
()
|
resolve()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
Converts the <a href="angular2/di/Binding-class"><code>Binding</code></a> into <a href="angular2/di/ResolvedBinding-class"><code>ResolvedBinding</code></a>.
|
||||||
|
|
||||||
|
<a href="angular2/di/Injector-class"><code>Injector</code></a> internally only uses <a href="angular2/di/ResolvedBinding-class"><code>ResolvedBinding</code></a>, <a href="angular2/di/Binding-class"><code>Binding</code></a> contains convenience binding syntax.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -92,10 +92,10 @@ p.
|
|||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Bind a key to an alias of an existing key.
|
Binds a key to the alias for an existing key.
|
||||||
|
|
||||||
An alias means that we will return the same instance as if the alias token was used. (This is in contrast to
|
An alias means that <a href="angular2/di/Injector-class"><code>Injector</code></a> returns the same instance as if the alias token was used. This is in contrast to
|
||||||
`toClass` where a separet instance of `toClass` will be returned.)
|
`toClass` where a separate instance of `toClass` is returned.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ p.
|
|||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Bind a key to a function which computes the value asynchronously.
|
Binds a key to a function which computes the value asynchronously.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -150,9 +150,10 @@ p.
|
|||||||
injector.asyncGet(String).then((v) => expect(v).toBe('Value: 3'));
|
injector.asyncGet(String).then((v) => expect(v).toBe('Value: 3'));
|
||||||
```
|
```
|
||||||
|
|
||||||
The interesting thing to note is that event thougt `Numeber` has an async factory, the `String` factory
|
The interesting thing to note is that event though `Number` has an async factory, the `String` factory
|
||||||
function takes the resolved value. This shows that the [Injector] delays executing of the `String` factory
|
function takes the resolved value. This shows that the <a href="angular2/di/Injector-class"><code>Injector</code></a> delays executing the `String` factory
|
||||||
until after the `Number` is resolved. This can only be done if the `token` is retrive
|
until after the `Number` is resolved. This can only be done if the `token` is retrieved using the
|
||||||
|
`asyncGet` API in the <a href="angular2/di/Injector-class"><code>Injector</code></a>.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -164,11 +165,11 @@ p.
|
|||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Bind an interface to an implementation / subclass.
|
Binds an interface to an implementation / subclass.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Becuse `toAlias` and `toClass` are often confused the example contains both use cases for easy comparison.
|
Becuse `toAlias` and `toClass` are often confused, the example contains both use cases for easy comparison.
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
|
||||||
@ -202,7 +203,7 @@ p.
|
|||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Bind a key to a function which computes the value.
|
Binds a key to a function which computes the value.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -227,7 +228,7 @@ p.
|
|||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Bind a key to a value.
|
Binds a key to a value.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -249,7 +250,7 @@ p.
|
|||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Token used when retriving this binding. Usually the [Type].
|
Token used when retrieving this binding. Usually the `Type`.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
|
|
||||||
p.
|
p.
|
||||||
<span class="location-badge">exported from <a href="/angular2/di">angular2/di</a></span>
|
<span class="location-badge">exported from <a href="/angular2/di">angular2/di</a></span>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/binding.js#L299">angular2/src/di/binding.js (line 299)</a>
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/binding.js#L315">angular2/src/di/binding.js (line 315)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Helper class for [bind] function.
|
Helper class for the <a href="angular2/di/bind-function"><code>bind</code></a> function.
|
||||||
|
|
||||||
.l-main-section
|
.l-main-section
|
||||||
h2 Members
|
h2 Members
|
||||||
.l-sub-section
|
.l-sub-section
|
||||||
@ -13,8 +14,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(token)
|
constructor(token)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -29,19 +29,18 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(aliasToken)
|
toAlias(aliasToken)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Bind a key to an alias of an existing key.
|
Binds a key to the alias for an existing key.
|
||||||
|
|
||||||
An alias means that we will return the same instance as if the alias token was used. (This is in contrast to
|
An alias means that we will return the same instance as if the alias token was used. (This is in contrast to
|
||||||
`toClass` where a separet instance of `toClass` will be returned.)
|
`toClass` where a separet instance of `toClass` will be returned.)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Becuse `toAlias` and `toClass` are often confused the example contains both use cases for easy comparison.
|
Becuse `toAlias` and `toClass` are often confused, the example contains both use cases for easy comparison.
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
|
||||||
@ -75,12 +74,11 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(factoryFunction:Function, dependencies:List = null)
|
toAsyncFactory(factoryFunction:Function, dependencies:List = null)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Bind a key to a function which computes the value asynchronously.
|
Binds a key to a function which computes the value asynchronously.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -96,9 +94,10 @@ p.
|
|||||||
injector.asyncGet(String).then((v) => expect(v).toBe('Value: 3'));
|
injector.asyncGet(String).then((v) => expect(v).toBe('Value: 3'));
|
||||||
```
|
```
|
||||||
|
|
||||||
The interesting thing to note is that event thougt `Numeber` has an async factory, the `String` factory
|
The interesting thing to note is that event though `Number` has an async factory, the `String` factory
|
||||||
function takes the resolved value. This shows that the [Injector] delays executing of the `String` factory
|
function takes the resolved value. This shows that the <a href="angular2/di/Injector-class"><code>Injector</code></a> delays executing of the `String` factory
|
||||||
until after the `Number` is resolved. This can only be done if the `token` is retrive
|
until after the `Number` is resolved. This can only be done if the `token` is retrieved using the
|
||||||
|
the `asyncGet` API in the <a href="angular2/di/Injector-class"><code>Injector</code></a>.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -110,16 +109,15 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(type:Type)
|
toClass(type:Type)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Bind an interface to an implementation / subclass.
|
Binds an interface to an implementation / subclass.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Becuse `toAlias` and `toClass` are often confused the example contains both use cases for easy comparison.
|
Because `toAlias` and `toClass` are often confused, the example contains both use cases for easy comparison.
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
|
||||||
@ -153,12 +151,11 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(factoryFunction:Function, dependencies:List = null)
|
toFactory(factoryFunction:Function, dependencies:List = null)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Bind a key to a function which computes the value.
|
Binds a key to a function which computes the value.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -182,12 +179,11 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(value)
|
toValue(value)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Bind a key to a value.
|
Binds a key to a value.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,8 +25,8 @@ p.
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Next we need to write the code that creates and instantiates the `Injector`. We then ask for the `root` object,
|
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.
|
`Car`, so that the `Injector` can recursively build all of that object's dependencies.
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
main() {
|
main() {
|
||||||
@ -36,7 +36,7 @@ p.
|
|||||||
var car = injector.get(Car);
|
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
|
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.
|
object's dependencies automatically.
|
||||||
|
|
||||||
.l-main-section
|
.l-main-section
|
||||||
@ -47,8 +47,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(bindings:List<ResolvedBinding>, parent:Injector, defaultBindings:boolean, [object Object], [object Object], [object Object])
|
constructor(bindings:List<ResolvedBinding>, parent:Injector, defaultBindings:boolean, [object Object], [object Object], [object Object])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -63,12 +62,11 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(token, [object Object])
|
asyncGet(token, [object Object])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Used to retrieve an instance from the injector asynchronously. Used with asynchronous bindings.
|
Retrieves an instance from the injector asynchronously. Used with asynchronous bindings.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -81,12 +79,11 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(bindings:List<ResolvedBinding>, [object Object])
|
createChildFromResolved(bindings:List<ResolvedBinding>, [object Object])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Create a child injector and load a new set of [ResolvedBinding] into it.
|
Creates a child injector and loads a new set of <a href="angular2/di/ResolvedBinding-class"><code>ResolvedBinding</code></a>s into it.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -99,12 +96,11 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(bindings:List<ResolvedBinding>, {defaultBindings=false}={}, [object Object], [object Object])
|
fromResolvedBindings(bindings:List<ResolvedBinding>, {defaultBindings=false}={}, [object Object], [object Object])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Creates an injector from previously resolved bindings. This bypasses resolution and flattening. This API is
|
Creates an injector from previously resolved bindings. This bypasses resolution and flattening. This API is the
|
||||||
recommended way to construct injectors in performance-sensitive parts.
|
recommended way to construct injectors in performance-sensitive parts.
|
||||||
|
|
||||||
|
|
||||||
@ -118,12 +114,11 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(token, [object Object])
|
get(token, [object Object])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Used to retrieve an instance from the injector.
|
Retrieves an instance from the injector.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -136,12 +131,11 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(token, [object Object])
|
getOptional(token, [object Object])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Used to retrieve an instance from the injector.
|
Retrieves an instance from the injector.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -154,15 +148,15 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(bindings:List, [object Object])
|
resolve(bindings:List, [object Object])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Turns a list of binding definitions into internal resolved list of resolved bindings.
|
Turns a list of binding definitions into an internal resolved list of resolved bindings.
|
||||||
|
|
||||||
A resolution is a process of flattening multiple nested lists and converting individual bindings into a
|
A resolution is a process of flattening multiple nested lists and converting individual bindings into a
|
||||||
list of [ResolvedBinding]s. The resolution can be cached for performance sensitive code.
|
list of <a href="angular2/di/ResolvedBinding-class"><code>ResolvedBinding</code></a>s. The resolution can be cached by `resolve` for the <a href="angular2/di/Injector-class"><code>Injector</code></a> for
|
||||||
|
performance-sensitive code.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -175,15 +169,15 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(bindings:List, {defaultBindings=false}={}, [object Object], [object Object])
|
resolveAndCreate(bindings:List, {defaultBindings=false}={}, [object Object], [object Object])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Resolves bindings and creates an injector based on those bindings. This function is slower than the
|
Resolves bindings and creates an injector based on those bindings. This function is slower than the
|
||||||
corresponding [fromResolvedBindings] because it needs to resolve bindings first. See [Injector.resolve].
|
corresponding `fromResolvedBindings` because it needs to resolve bindings first. See `resolve` for the
|
||||||
|
<a href="angular2/di/Injector-class"><code>Injector</code></a>.
|
||||||
|
|
||||||
Prefer [fromResolvedBindings] in performance-critical code that creates lots of injectors.
|
Prefer `fromResolvedBindings` in performance-critical code that creates lots of injectors.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -196,18 +190,15 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(bindings:List, [object Object])
|
resolveAndCreateChild(bindings:List, [object Object])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Create a child injector and load a new set of bindings into it.
|
Creates a child injector and loads a new set of bindings into it.
|
||||||
|
|
||||||
A resolution is a process of flattening multiple nested and converting individual bindings into a
|
A resolution is a process of flattening multiple nested lists and converting individual bindings into a
|
||||||
list of [ResolvedBinding]s. The resolution can be cached [Injector.resolve] for performance sensitive
|
list of <a href="angular2/di/ResolvedBinding-class"><code>ResolvedBinding</code></a>s. The resolution can be cached by `resolve` for the <a href="angular2/di/Injector-class"><code>Injector</code></a> for
|
||||||
code.
|
performance-sensitive code.
|
||||||
|
|
||||||
See: [Injector.resolve].
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,14 +4,14 @@ p.
|
|||||||
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/key.js#L17">angular2/src/di/key.js (line 17)</a>
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/key.js#L17">angular2/src/di/key.js (line 17)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
A unique object used for retrieving items from the Injector.
|
A unique object used for retrieving items from the <a href="angular2/di/Injector-class"><code>Injector</code></a>.
|
||||||
|
|
||||||
[Key]s have:
|
Keys have:
|
||||||
- system wide unique [id].
|
- a system-wide unique `id`.
|
||||||
- [token] usually the [Type] of the instance.
|
- a `token`, usually the `Type` of the instance.
|
||||||
|
|
||||||
[Key]s are used internaly in [Injector] becouse they have system wide unique [id]s which allow the injector to
|
Keys are used internally by the <a href="angular2/di/Injector-class"><code>Injector</code></a> because their system-wide unique `id`s allow the
|
||||||
index in arrays rather ther look up items in maps.
|
injector to index in arrays rather than looking up items in maps.
|
||||||
|
|
||||||
.l-main-section
|
.l-main-section
|
||||||
h2 Members
|
h2 Members
|
||||||
@ -21,8 +21,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(token, id)
|
constructor(token, id)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -37,12 +36,11 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(token)
|
get(token)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Retrieve a [Key] for a token.
|
Retrieves a `Key` for a token.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
75
public/docs/js/latest/api/di/ResolvedBinding-class.jade
Normal file
75
public/docs/js/latest/api/di/ResolvedBinding-class.jade
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
|
||||||
|
p.
|
||||||
|
<span class="location-badge">exported from <a href="/angular2/di">angular2/di</a></span>
|
||||||
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/binding.js#L263">angular2/src/di/binding.js (line 263)</a>
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
An internal resolved representation of a <a href="angular2/di/Binding-class"><code>Binding</code></a> used by the <a href="angular2/di/Injector-class"><code>Injector</code></a>.
|
||||||
|
|
||||||
|
A <a href="angular2/di/Binding-class"><code>Binding</code></a> is resolved when it has a factory function. Binding to a class, alias, or value, are just convenience
|
||||||
|
methods, as <a href="angular2/di/Injector-class"><code>Injector</code></a> only operates on calling factory functions.
|
||||||
|
|
||||||
|
.l-main-section
|
||||||
|
h2 Members
|
||||||
|
.l-sub-section
|
||||||
|
h3 constructor
|
||||||
|
|
||||||
|
|
||||||
|
pre.prettyprint
|
||||||
|
code.
|
||||||
|
constructor(key:Key, factory:Function, dependencies:List<Dependency>, providedAsPromise:boolean)
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3 dependencies
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
Arguments (dependencies) to the `factory` function.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3 factory
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
Factory function which can return an instance of an object represented by a key.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3 key
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
A key, usually a `Type`.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3 providedAsPromise
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
Specifies whether the `factory` function returns a `Promise`.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -3,6 +3,10 @@
|
|||||||
"title" : "Binding Class"
|
"title" : "Binding Class"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"ResolvedBinding-class" : {
|
||||||
|
"title" : "ResolvedBinding Class"
|
||||||
|
},
|
||||||
|
|
||||||
"bind-function" : {
|
"bind-function" : {
|
||||||
"title" : "bind Function"
|
"title" : "bind Function"
|
||||||
},
|
},
|
||||||
|
@ -8,7 +8,16 @@
|
|||||||
exported from <a href="/angular2/di">angular2/di</a>
|
exported from <a href="/angular2/di">angular2/di</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Provides fluent API for imperative construction of [Binding] objects. (JavaScript only.)
|
Provides an API for imperatively constructing <a href="angular2/di/Binding-class"><code>Binding</code></a>s.
|
||||||
|
|
||||||
|
This is only relevant for JavaScript. See <a href="angular2/di/BindingBuilder-class"><code>BindingBuilder</code></a>.
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
bind(MyInterface).toClass(MyClass)
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
|
|
||||||
p.
|
p.
|
||||||
<span class="location-badge">exported from <a href="/angular2/di_annotations">angular2/di_annotations</a></span>
|
<span class="location-badge">exported from <a href="/angular2/di_annotations">angular2/di_annotations</a></span>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/annotations.js#L109">angular2/src/di/annotations.js (line 109)</a>
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/annotations.js#L110">angular2/src/di/annotations.js (line 110)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
`DependencyAnnotation` is used by the framework to extend DI.
|
`DependencyAnnotation` is used by the framework to extend DI.
|
||||||
|
|
||||||
Only annotations implementing `DependencyAnnotation` will be added
|
Only annotations implementing `DependencyAnnotation` are added to the list of dependency properties.
|
||||||
to the list of dependency properties.
|
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
@ -37,8 +36,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
()
|
constructor()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -4,7 +4,7 @@ p.
|
|||||||
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/annotations.js#L13">angular2/src/di/annotations.js (line 13)</a>
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/annotations.js#L13">angular2/src/di/annotations.js (line 13)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
A parameter annotation that creates a synchronous eager dependency.
|
A parameter annotation that specifies a dependency.
|
||||||
|
|
||||||
```
|
```
|
||||||
class AComponent {
|
class AComponent {
|
||||||
@ -20,8 +20,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(token)
|
constructor(token)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -22,8 +22,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(token)
|
constructor(token)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -4,7 +4,7 @@ p.
|
|||||||
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/annotations.js#L34">angular2/src/di/annotations.js (line 34)</a>
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/annotations.js#L34">angular2/src/di/annotations.js (line 34)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
A parameter annotation that creates an asynchronous eager dependency.
|
A parameter annotation that specifies a `Promise` of a dependency.
|
||||||
|
|
||||||
```
|
```
|
||||||
class AComponent {
|
class AComponent {
|
||||||
@ -22,8 +22,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(token)
|
constructor(token)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
|
|
||||||
p.
|
p.
|
||||||
<span class="location-badge">exported from <a href="/angular2/di_annotations">angular2/di_annotations</a></span>
|
<span class="location-badge">exported from <a href="/angular2/di_annotations">angular2/di_annotations</a></span>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/annotations.js#L133">angular2/src/di/annotations.js (line 133)</a>
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/annotations.js#L134">angular2/src/di/annotations.js (line 134)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
A marker annotation that marks a class as available to `Injector`s for creation. Used by tooling for generating
|
A marker annotation that marks a class as available to `Injector` for creation. Used by tooling for
|
||||||
constructor stubs.
|
generating constructor stubs.
|
||||||
|
|
||||||
```
|
```
|
||||||
class NeedsService {
|
class NeedsService {
|
||||||
@ -23,8 +23,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
()
|
constructor()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
|
|
||||||
p.
|
p.
|
||||||
<span class="location-badge">exported from <a href="/angular2/di_annotations">angular2/di_annotations</a></span>
|
<span class="location-badge">exported from <a href="/angular2/di_annotations">angular2/di_annotations</a></span>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/annotations.js#L75">angular2/src/di/annotations.js (line 75)</a>
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/annotations.js#L77">angular2/src/di/annotations.js (line 77)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
A parameter annotation that marks a dependency as optional. (Injects `null` if not found.)
|
A parameter annotation that marks a dependency as optional. <a href="angular2/di/Injector-class"><code>Injector</code></a> provides `null` if the dependency is not
|
||||||
|
found.
|
||||||
|
|
||||||
```
|
```
|
||||||
class AComponent {
|
class AComponent {
|
||||||
constructor(@Optional() aService:MyService) {
|
constructor(@Optional() aService:MyService) {
|
||||||
@ -21,8 +23,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
()
|
constructor()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -0,0 +1,92 @@
|
|||||||
|
|
||||||
|
p.
|
||||||
|
<span class="location-badge">exported from <a href="/angular2/di_errors">angular2/di_errors</a></span>
|
||||||
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/exceptions.js#L32">angular2/src/di/exceptions.js (line 32)</a>
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
Base class for all errors arising from misconfigured bindings.
|
||||||
|
|
||||||
|
.l-main-section
|
||||||
|
h2 Members
|
||||||
|
.l-sub-section
|
||||||
|
h3 constructor
|
||||||
|
|
||||||
|
|
||||||
|
pre.prettyprint
|
||||||
|
code.
|
||||||
|
constructor(key, constructResolvingMessage:Function)
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3 addKey
|
||||||
|
|
||||||
|
|
||||||
|
pre.prettyprint
|
||||||
|
code.
|
||||||
|
addKey(key)
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3 constructResolvingMessage
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3 keys
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3 message
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3 toString
|
||||||
|
|
||||||
|
|
||||||
|
pre.prettyprint
|
||||||
|
code.
|
||||||
|
toString()
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -4,7 +4,7 @@ p.
|
|||||||
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/exceptions.js#L95">angular2/src/di/exceptions.js (line 95)</a>
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/exceptions.js#L95">angular2/src/di/exceptions.js (line 95)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Throw when trying to retrieve async [Binding] using sync API.
|
Thrown when trying to retrieve an async <a href="angular2/di/Binding-class"><code>Binding</code></a> using the sync API.
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
@ -22,8 +22,8 @@ p.
|
|||||||
}).toThrowError(AsycBindingError);
|
}).toThrowError(AsycBindingError);
|
||||||
```
|
```
|
||||||
|
|
||||||
The above example throws because `String` dependes no `Numeber` which is async. If any binding in the dependency
|
The above example throws because `String` depends on `Number` which is async. If any binding in the dependency
|
||||||
graph is async then the graph can only be retrieved using `asyncGet` API.
|
graph is async then the graph can only be retrieved using the `asyncGet` API.
|
||||||
|
|
||||||
.l-main-section
|
.l-main-section
|
||||||
h2 Members
|
h2 Members
|
||||||
@ -33,8 +33,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(key)
|
constructor(key)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -4,7 +4,7 @@ p.
|
|||||||
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/exceptions.js#L124">angular2/src/di/exceptions.js (line 124)</a>
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/exceptions.js#L124">angular2/src/di/exceptions.js (line 124)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Throw when dependencies from a cyle.
|
Thrown when dependencies form a cycle.
|
||||||
|
|
||||||
## Example:
|
## Example:
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ p.
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Retrieving `A` or `B` will throw `CyclicDependencyError` as such a graph can not be constructed.
|
Retrieving `A` or `B` throws a `CyclicDependencyError` as the graph above cannot be constructed.
|
||||||
|
|
||||||
.l-main-section
|
.l-main-section
|
||||||
h2 Members
|
h2 Members
|
||||||
@ -27,8 +27,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(key)
|
constructor(key)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -4,9 +4,9 @@ p.
|
|||||||
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/exceptions.js#L141">angular2/src/di/exceptions.js (line 141)</a>
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/exceptions.js#L141">angular2/src/di/exceptions.js (line 141)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Thrown when constructing type returns with an Error.
|
Thrown when a constructing type returns with an Error.
|
||||||
|
|
||||||
The `InstantiationError` class contains the original error plus dependency graph which caused this object to be
|
The `InstantiationError` class contains the original error plus the dependency graph which caused this object to be
|
||||||
instantiated.
|
instantiated.
|
||||||
|
|
||||||
.l-main-section
|
.l-main-section
|
||||||
@ -17,8 +17,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(originalException, key)
|
constructor(originalException, key)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -4,7 +4,7 @@ p.
|
|||||||
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/exceptions.js#L157">angular2/src/di/exceptions.js (line 157)</a>
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/exceptions.js#L157">angular2/src/di/exceptions.js (line 157)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Thrown when object other then [Binding] (or [Type]) is passed to [Injector] creation.
|
Thrown when an object other then <a href="angular2/di/Binding-class"><code>Binding</code></a> (or `Type`) is passed to <a href="angular2/di/Injector-class"><code>Injector</code></a> creation.
|
||||||
|
|
||||||
.l-main-section
|
.l-main-section
|
||||||
h2 Members
|
h2 Members
|
||||||
@ -14,8 +14,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(binding)
|
constructor(binding)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -42,8 +41,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
()
|
toString()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -4,10 +4,10 @@ p.
|
|||||||
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/exceptions.js#L177">angular2/src/di/exceptions.js (line 177)</a>
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/exceptions.js#L177">angular2/src/di/exceptions.js (line 177)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Thrown when the class as no annotation information.
|
Thrown when the class has no annotation information.
|
||||||
|
|
||||||
Lack of annotation prevents the [Injector] from determininig what dependencies need to be injected int the
|
Lack of annotation information prevents the <a href="angular2/di/Injector-class"><code>Injector</code></a> from determining which dependencies need to be injected into
|
||||||
constructor.
|
the constructor.
|
||||||
|
|
||||||
.l-main-section
|
.l-main-section
|
||||||
h2 Members
|
h2 Members
|
||||||
@ -17,8 +17,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(typeOrFunc)
|
constructor(typeOrFunc)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -45,8 +44,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
()
|
toString()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
p.
|
||||||
|
<span class="location-badge">exported from <a href="/angular2/di_errors">angular2/di_errors</a></span>
|
||||||
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/di/exceptions.js#L61">angular2/src/di/exceptions.js (line 61)</a>
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
Thrown when trying to retrieve a dependency by `Key` from <a href="angular2/di/Injector-class"><code>Injector</code></a>, but the <a href="angular2/di/Injector-class"><code>Injector</code></a> does not have a
|
||||||
|
<a href="angular2/di/Binding-class"><code>Binding</code></a> for <a href="angular2/di/Key-class"><code>Key</code></a>.
|
||||||
|
|
||||||
|
.l-main-section
|
||||||
|
h2 Members
|
||||||
|
.l-sub-section
|
||||||
|
h3 constructor
|
||||||
|
|
||||||
|
|
||||||
|
pre.prettyprint
|
||||||
|
code.
|
||||||
|
constructor(key)
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"ProviderError-class" : {
|
"AbstractBindingError-class" : {
|
||||||
"title" : "ProviderError Class"
|
"title" : "AbstractBindingError Class"
|
||||||
},
|
},
|
||||||
|
|
||||||
"NoProviderError-class" : {
|
"NoBindingError-class" : {
|
||||||
"title" : "NoProviderError Class"
|
"title" : "NoBindingError Class"
|
||||||
},
|
},
|
||||||
|
|
||||||
"AsyncBindingError-class" : {
|
"AsyncBindingError-class" : {
|
||||||
|
@ -41,8 +41,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(viewContainer:ViewContainer)
|
constructor(viewContainer:ViewContainer)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -57,8 +56,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(tuples, viewContainer)
|
bulkInsert(tuples, viewContainer)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -74,8 +72,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(tuples, viewContainer)
|
bulkRemove(tuples, viewContainer)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -91,8 +88,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(changes)
|
iterableChanges(changes)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -108,8 +104,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(view, record)
|
perViewChange(view, record)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -32,8 +32,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(viewContainer: ViewContainer)
|
constructor(viewContainer: ViewContainer)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -48,8 +47,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(newCondition)
|
condition(newCondition)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -36,8 +36,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
()
|
constructor()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -52,8 +51,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(value)
|
value(value)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -22,8 +22,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(viewContainer: ViewContainer, sswitch: Switch)
|
constructor(viewContainer: ViewContainer, sswitch: Switch)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -26,8 +26,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(viewContainer: ViewContainer, sswitch: Switch)
|
constructor(viewContainer: ViewContainer, sswitch: Switch)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -42,8 +41,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(value)
|
when(value)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -20,8 +20,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(cd:ControlDirective, setCheckedProperty:Function)
|
constructor(cd:ControlDirective, setCheckedProperty:Function)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -48,8 +47,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(value)
|
writeValue(value)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -6,8 +6,8 @@ p.
|
|||||||
:markdown
|
:markdown
|
||||||
Defines a part of a form that cannot be divided into other controls.
|
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 [ControlGroup]
|
`Control` is one of the three fundamental building blocks used to define forms in Angular, along with
|
||||||
and [ControlArray].
|
<a href="angular2/forms/ControlGroup-class"><code>ControlGroup</code></a> and <a href="angular2/forms/ControlArray-class"><code>ControlArray</code></a>.
|
||||||
|
|
||||||
.l-main-section
|
.l-main-section
|
||||||
h2 Members
|
h2 Members
|
||||||
@ -17,8 +17,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(value:any, validator:Function = Validators.nullValidator)
|
constructor(value:any, validator:Function = Validators.nullValidator)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -33,8 +32,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(value:any)
|
updateValue(value:any)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -1,17 +1,18 @@
|
|||||||
|
|
||||||
p.
|
p.
|
||||||
<span class="location-badge">exported from <a href="/angular2/forms">angular2/forms</a></span>
|
<span class="location-badge">exported from <a href="/angular2/forms">angular2/forms</a></span>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/forms/model.js#L217">angular2/src/forms/model.js (line 217)</a>
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/forms/model.js#L219">angular2/src/forms/model.js (line 219)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Defines a part of a form, of variable length, that can contain other controls.
|
Defines a part of a form, of variable length, that can contain other controls.
|
||||||
|
|
||||||
A `ControlArray` aggregates the values and errors of each [Control] in the group. Thus, if one of the controls in a
|
A `ControlArray` aggregates the values and errors of each <a href="angular2/forms/Control-class"><code>Control</code></a> in the group. Thus, if one of the controls
|
||||||
group is invalid, the entire group is invalid. Similarly, if a control changes its value, the entire group changes
|
in a group is invalid, the entire group is invalid. Similarly, if a control changes its value, the entire group
|
||||||
as well.
|
changes as well.
|
||||||
|
|
||||||
`ControlArray` is one of the three fundamental building blocks used to define forms in Angular, along with [Control]
|
`ControlArray` is one of the three fundamental building blocks used to define forms in Angular, along with
|
||||||
and [ControlGroup]. [ControlGroup] can also contain other controls, but is of fixed length.
|
<a href="angular2/forms/Control-class"><code>Control</code></a> and <a href="angular2/forms/ControlGroup-class"><code>ControlGroup</code></a>. <a href="angular2/forms/ControlGroup-class"><code>ControlGroup</code></a> can also contain other controls, but is of fixed
|
||||||
|
length.
|
||||||
|
|
||||||
.l-main-section
|
.l-main-section
|
||||||
h2 Members
|
h2 Members
|
||||||
@ -21,8 +22,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(controls:List<AbstractControl>, validator:Function = Validators.array)
|
constructor(controls:List<AbstractControl>, validator:Function = Validators.array)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -37,8 +37,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(index:number)
|
at(index:number)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -66,8 +65,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(index:number, control:AbstractControl)
|
insert(index:number, control:AbstractControl)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -95,8 +93,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(control:AbstractControl)
|
push(control:AbstractControl)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -112,8 +109,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(index:number)
|
removeAt(index:number)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -12,7 +12,7 @@ p.
|
|||||||
the control will reflect that change. Likewise, if the value of the control changes, the input element reflects that
|
the control will reflect that change. Likewise, if the value of the control changes, the input element reflects that
|
||||||
change.
|
change.
|
||||||
|
|
||||||
Here we use [FormDirectives], rather than importing each form directive individually, e.g.
|
Here we use <a href="angular2/forms/FormDirectives-var"><code>FormDirectives</code></a>, rather than importing each form directive individually, e.g.
|
||||||
`ControlDirective`, `ControlGroupDirective`. This is just a shorthand for the same end result.
|
`ControlDirective`, `ControlGroupDirective`. This is just a shorthand for the same end result.
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -39,8 +39,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(groupDirective:ControlGroupDirective, valueAccessor:DefaultValueAccessor)
|
constructor(groupDirective:ControlGroupDirective, valueAccessor:DefaultValueAccessor)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -67,8 +66,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(_)
|
onChange(_)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -1,17 +1,18 @@
|
|||||||
|
|
||||||
p.
|
p.
|
||||||
<span class="location-badge">exported from <a href="/angular2/forms">angular2/forms</a></span>
|
<span class="location-badge">exported from <a href="/angular2/forms">angular2/forms</a></span>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/forms/model.js#L131">angular2/src/forms/model.js (line 131)</a>
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/forms/model.js#L132">angular2/src/forms/model.js (line 132)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Defines a part of a form, of fixed length, that can contain other controls.
|
Defines a part of a form, of fixed length, that can contain other controls.
|
||||||
|
|
||||||
A ControlGroup aggregates the values and errors of each [Control] in the group. Thus, if one of the controls in a
|
A ControlGroup aggregates the values and errors of each <a href="angular2/forms/Control-class"><code>Control</code></a> in the group. Thus, if one of the controls
|
||||||
group is invalid, the entire group is invalid. Similarly, if a control changes its value, the entire group changes
|
in a group is invalid, the entire group is invalid. Similarly, if a control changes its value, the entire group
|
||||||
as well.
|
changes as well.
|
||||||
|
|
||||||
`ControlGroup` is one of the three fundamental building blocks used to define forms in Angular, along with [Control]
|
`ControlGroup` is one of the three fundamental building blocks used to define forms in Angular, along with
|
||||||
and [ControlArray]. [ControlArray] can also contain other controls, but is of variable length.
|
<a href="angular2/forms/Control-class"><code>Control</code></a> and <a href="angular2/forms/ControlArray-class"><code>ControlArray</code></a>. <a href="angular2/forms/ControlArray-class"><code>ControlArray</code></a> can also contain other controls, but is of variable
|
||||||
|
length.
|
||||||
|
|
||||||
.l-main-section
|
.l-main-section
|
||||||
h2 Members
|
h2 Members
|
||||||
@ -21,8 +22,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(controls:StringMap, optionals:StringMap = null, validator:Function = Validators.group)
|
constructor(controls:StringMap, optionals:StringMap = null, validator:Function = Validators.group)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -37,8 +37,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(controlName:string)
|
contains(controlName:string)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -66,8 +65,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(controlName:string)
|
exclude(controlName:string)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -83,8 +81,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(controlName:string)
|
include(controlName:string)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -11,7 +11,7 @@ p.
|
|||||||
In this example, we bind the control group to the form element, and we bind the login and password controls to the
|
In this example, we bind the control group to the form element, and we bind the login and password controls to the
|
||||||
login and password elements.
|
login and password elements.
|
||||||
|
|
||||||
Here we use [FormDirectives], rather than importing each form directive individually, e.g.
|
Here we use <a href="angular2/forms/FormDirectives-var"><code>FormDirectives</code></a>, rather than importing each form directive individually, e.g.
|
||||||
`ControlDirective`, `ControlGroupDirective`. This is just a shorthand for the same end result.
|
`ControlDirective`, `ControlGroupDirective`. This is just a shorthand for the same end result.
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -49,8 +49,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(groupDirective:ControlGroupDirective)
|
constructor(groupDirective:ControlGroupDirective)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -65,8 +64,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(c:ControlDirective)
|
addDirective(c:ControlDirective)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -82,8 +80,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(controlGroup)
|
controlGroup(controlGroup)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -99,8 +96,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(name:string)
|
findControl(name:string)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -4,7 +4,7 @@ p.
|
|||||||
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/forms/directives.js#L31">angular2/src/forms/directives.js (line 31)</a>
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/forms/directives.js#L31">angular2/src/forms/directives.js (line 31)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
The default accessor for writing a value and listening to changes that is used by a [Control] directive.
|
The default accessor for writing a value and listening to changes that is used by a <a href="angular2/forms/Control-class"><code>Control</code></a> directive.
|
||||||
|
|
||||||
This is the default strategy that Angular uses when no other accessor is applied.
|
This is the default strategy that Angular uses when no other accessor is applied.
|
||||||
|
|
||||||
@ -21,8 +21,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(setValueProperty:Function)
|
constructor(setValueProperty:Function)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -49,8 +48,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(value)
|
writeValue(value)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -8,8 +8,8 @@ p.
|
|||||||
|
|
||||||
# Example
|
# Example
|
||||||
|
|
||||||
This example creates a [ControlGroup] that consists of a `login` [Control], and a nested [ControlGroup] that defines
|
This example creates a <a href="angular2/forms/ControlGroup-class"><code>ControlGroup</code></a> that consists of a `login` <a href="angular2/forms/Control-class"><code>Control</code></a>, and a nested
|
||||||
a `password` and a `passwordConfirmation` [Control].
|
<a href="angular2/forms/ControlGroup-class"><code>ControlGroup</code></a> that defines a `password` and a `passwordConfirmation` <a href="angular2/forms/Control-class"><code>Control</code></a>.
|
||||||
|
|
||||||
```
|
```
|
||||||
var loginForm = builder.group({
|
var loginForm = builder.group({
|
||||||
@ -30,8 +30,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(controlsConfig:List, validator:Function = null)
|
array(controlsConfig:List, validator:Function = null)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -47,8 +46,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(value, validator:Function = null)
|
control(value, validator:Function = null)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -64,8 +62,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(controlsConfig, extra = null)
|
group(controlsConfig, extra = null)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -20,8 +20,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(c:modelModule.ControlArray)
|
array(c:modelModule.ControlArray)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -37,8 +36,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(validators:List<Function>)
|
compose(validators:List<Function>)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -54,8 +52,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(c:modelModule.ControlGroup)
|
group(c:modelModule.ControlGroup)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -71,8 +68,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(c:any)
|
nullValidator(c:any)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -88,8 +84,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(c:modelModule.Control)
|
required(c:modelModule.Control)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -13,8 +13,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(item)
|
constructor(item)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -65,8 +64,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
()
|
toString()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -13,8 +13,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
()
|
constructor()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -29,8 +28,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(collection)
|
check(collection)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -58,8 +56,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(fn:Function)
|
forEachAddedItem(fn:Function)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -75,8 +72,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(fn:Function)
|
forEachItem(fn:Function)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -92,8 +88,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(fn:Function)
|
forEachMovedItem(fn:Function)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -109,8 +104,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(fn:Function)
|
forEachPreviousItem(fn:Function)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -126,8 +120,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(fn:Function)
|
forEachRemovedItem(fn:Function)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -167,8 +160,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(obj)
|
supports(obj)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -184,8 +176,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(obj)
|
supportsObj(obj)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -201,8 +192,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
()
|
toString()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -218,8 +208,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(collection)
|
transform(collection)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -13,8 +13,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(key)
|
constructor(key)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -65,8 +64,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
()
|
toString()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -13,8 +13,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
()
|
constructor()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -29,8 +28,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(map)
|
check(map)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -46,8 +44,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(fn:Function)
|
forEachAddedItem(fn:Function)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -63,8 +60,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(fn:Function)
|
forEachChangedItem(fn:Function)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -80,8 +76,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(fn:Function)
|
forEachItem(fn:Function)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -97,8 +92,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(fn:Function)
|
forEachPreviousItem(fn:Function)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -114,8 +108,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(fn:Function)
|
forEachRemovedItem(fn:Function)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -143,8 +136,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(obj)
|
supports(obj)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -160,8 +152,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(obj)
|
supportsObj(obj)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -177,8 +168,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
()
|
toString()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -194,8 +184,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(map)
|
transform(map)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -13,8 +13,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(cdRef)
|
create(cdRef)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -30,8 +29,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(obj)
|
supports(obj)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -13,8 +13,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
()
|
constructor()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -41,8 +40,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(obj)
|
supports(obj)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -58,8 +56,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(obj)
|
supportsObj(obj)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -75,8 +72,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(value)
|
transform(value)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -13,8 +13,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(cdRef)
|
create(cdRef)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -30,8 +29,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(obj)
|
supports(obj)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -6,7 +6,7 @@ p.
|
|||||||
:markdown
|
:markdown
|
||||||
An interface for extending the list of pipes known to Angular.
|
An interface for extending the list of pipes known to Angular.
|
||||||
|
|
||||||
If you are writing a custom [Pipe], you must extend this interface.
|
If you are writing a custom <a href="angular2/pipes/Pipe-class"><code>Pipe</code></a>, you must extend this interface.
|
||||||
|
|
||||||
#Example
|
#Example
|
||||||
|
|
||||||
@ -30,8 +30,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
()
|
onDestroy()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -47,8 +46,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(obj)
|
supports(obj)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -64,8 +62,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(value:any)
|
transform(value:any)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -1,4 +1,12 @@
|
|||||||
{
|
{
|
||||||
|
"keyValDiff-var" : {
|
||||||
|
"title" : "keyValDiff Var"
|
||||||
|
},
|
||||||
|
|
||||||
|
"iterableDiff-var" : {
|
||||||
|
"title" : "iterableDiff Var"
|
||||||
|
},
|
||||||
|
|
||||||
"IterableChanges-class" : {
|
"IterableChanges-class" : {
|
||||||
"title" : "IterableChanges Class"
|
"title" : "IterableChanges Class"
|
||||||
},
|
},
|
||||||
|
9
public/docs/js/latest/api/pipes/iterableDiff-var.jade
Normal file
9
public/docs/js/latest/api/pipes/iterableDiff-var.jade
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
.l-main-section
|
||||||
|
h2 iterableDiff <span class="type">variable</span>
|
||||||
|
p(class="module") exported from <a href="/angular2/pipes">angular2/pipes</a>
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
Structural diffing for `Iterable` types such as `Array`s.
|
||||||
|
|
||||||
|
|
9
public/docs/js/latest/api/pipes/keyValDiff-var.jade
Normal file
9
public/docs/js/latest/api/pipes/keyValDiff-var.jade
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
.l-main-section
|
||||||
|
h2 keyValDiff <span class="type">variable</span>
|
||||||
|
p(class="module") exported from <a href="/angular2/pipes">angular2/pipes</a>
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
Structural diffing for `Object`s and `Map`s.
|
||||||
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
|||||||
{
|
{
|
||||||
|
"keyValDiff-var" : {
|
||||||
|
"title" : "keyValDiff Var"
|
||||||
|
},
|
||||||
|
|
||||||
|
"iterableDiff-var" : {
|
||||||
|
"title" : "iterableDiff Var"
|
||||||
|
},
|
||||||
|
|
||||||
"defaultPipes-var" : {
|
"defaultPipes-var" : {
|
||||||
"title" : "defaultPipes Var"
|
"title" : "defaultPipes Var"
|
||||||
},
|
},
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"ChangeDetectorJITGenerator-class" : {
|
||||||
|
"title" : "ChangeDetectorJITGenerator Class"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"BaseQueryList-class" : {
|
||||||
|
"title" : "BaseQueryList Class"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"GetTestability-class" : {
|
||||||
|
"title" : "GetTestability Class"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"VmTurnZone-class" : {
|
||||||
|
"title" : "VmTurnZone Class"
|
||||||
|
}
|
||||||
|
}
|
@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"ProviderError-class" : {
|
"AbstractBindingError-class" : {
|
||||||
"title" : "ProviderError Class"
|
"title" : "AbstractBindingError Class"
|
||||||
},
|
},
|
||||||
|
|
||||||
"NoProviderError-class" : {
|
"NoBindingError-class" : {
|
||||||
"title" : "NoProviderError Class"
|
"title" : "NoBindingError Class"
|
||||||
},
|
},
|
||||||
|
|
||||||
"AsyncBindingError-class" : {
|
"AsyncBindingError-class" : {
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"BrowserDomAdapter-class" : {
|
||||||
|
"title" : "BrowserDomAdapter Class"
|
||||||
|
}
|
||||||
|
}
|
21
public/docs/js/latest/api/src/facade/async/_data.json
Normal file
21
public/docs/js/latest/api/src/facade/async/_data.json
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"Promise-var" : {
|
||||||
|
"title" : "Promise Var"
|
||||||
|
},
|
||||||
|
|
||||||
|
"PromiseWrapper-class" : {
|
||||||
|
"title" : "PromiseWrapper Class"
|
||||||
|
},
|
||||||
|
|
||||||
|
"ObservableWrapper-class" : {
|
||||||
|
"title" : "ObservableWrapper Class"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Observable-class" : {
|
||||||
|
"title" : "Observable Class"
|
||||||
|
},
|
||||||
|
|
||||||
|
"EventEmitter-class" : {
|
||||||
|
"title" : "EventEmitter Class"
|
||||||
|
}
|
||||||
|
}
|
13
public/docs/js/latest/api/src/facade/browser/_data.json
Normal file
13
public/docs/js/latest/api/src/facade/browser/_data.json
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"document-var" : {
|
||||||
|
"title" : "document Var"
|
||||||
|
},
|
||||||
|
|
||||||
|
"location-var" : {
|
||||||
|
"title" : "location Var"
|
||||||
|
},
|
||||||
|
|
||||||
|
"gc-var" : {
|
||||||
|
"title" : "gc Var"
|
||||||
|
}
|
||||||
|
}
|
41
public/docs/js/latest/api/src/facade/collection/_data.json
Normal file
41
public/docs/js/latest/api/src/facade/collection/_data.json
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"List-var" : {
|
||||||
|
"title" : "List Var"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Map-var" : {
|
||||||
|
"title" : "Map Var"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Set-var" : {
|
||||||
|
"title" : "Set Var"
|
||||||
|
},
|
||||||
|
|
||||||
|
"StringMap-var" : {
|
||||||
|
"title" : "StringMap Var"
|
||||||
|
},
|
||||||
|
|
||||||
|
"MapWrapper-class" : {
|
||||||
|
"title" : "MapWrapper Class"
|
||||||
|
},
|
||||||
|
|
||||||
|
"StringMapWrapper-class" : {
|
||||||
|
"title" : "StringMapWrapper Class"
|
||||||
|
},
|
||||||
|
|
||||||
|
"ListWrapper-class" : {
|
||||||
|
"title" : "ListWrapper Class"
|
||||||
|
},
|
||||||
|
|
||||||
|
"isListLikeIterable-function" : {
|
||||||
|
"title" : "isListLikeIterable Function"
|
||||||
|
},
|
||||||
|
|
||||||
|
"iterateListLike-function" : {
|
||||||
|
"title" : "iterateListLike Function"
|
||||||
|
},
|
||||||
|
|
||||||
|
"SetWrapper-class" : {
|
||||||
|
"title" : "SetWrapper Class"
|
||||||
|
}
|
||||||
|
}
|
113
public/docs/js/latest/api/src/facade/lang/_data.json
Normal file
113
public/docs/js/latest/api/src/facade/lang/_data.json
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
{
|
||||||
|
"Type-var" : {
|
||||||
|
"title" : "Type Var"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Math-var" : {
|
||||||
|
"title" : "Math Var"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Date-var" : {
|
||||||
|
"title" : "Date Var"
|
||||||
|
},
|
||||||
|
|
||||||
|
"CONST-class" : {
|
||||||
|
"title" : "CONST Class"
|
||||||
|
},
|
||||||
|
|
||||||
|
"ABSTRACT-class" : {
|
||||||
|
"title" : "ABSTRACT Class"
|
||||||
|
},
|
||||||
|
|
||||||
|
"IMPLEMENTS-class" : {
|
||||||
|
"title" : "IMPLEMENTS Class"
|
||||||
|
},
|
||||||
|
|
||||||
|
"isPresent-function" : {
|
||||||
|
"title" : "isPresent Function"
|
||||||
|
},
|
||||||
|
|
||||||
|
"isBlank-function" : {
|
||||||
|
"title" : "isBlank Function"
|
||||||
|
},
|
||||||
|
|
||||||
|
"isString-function" : {
|
||||||
|
"title" : "isString Function"
|
||||||
|
},
|
||||||
|
|
||||||
|
"isFunction-function" : {
|
||||||
|
"title" : "isFunction Function"
|
||||||
|
},
|
||||||
|
|
||||||
|
"stringify-function" : {
|
||||||
|
"title" : "stringify Function"
|
||||||
|
},
|
||||||
|
|
||||||
|
"StringWrapper-class" : {
|
||||||
|
"title" : "StringWrapper Class"
|
||||||
|
},
|
||||||
|
|
||||||
|
"StringJoiner-class" : {
|
||||||
|
"title" : "StringJoiner Class"
|
||||||
|
},
|
||||||
|
|
||||||
|
"NumberParseError-class" : {
|
||||||
|
"title" : "NumberParseError Class"
|
||||||
|
},
|
||||||
|
|
||||||
|
"NumberWrapper-class" : {
|
||||||
|
"title" : "NumberWrapper Class"
|
||||||
|
},
|
||||||
|
|
||||||
|
"RegExp-var" : {
|
||||||
|
"title" : "RegExp Var"
|
||||||
|
},
|
||||||
|
|
||||||
|
"RegExpWrapper-class" : {
|
||||||
|
"title" : "RegExpWrapper Class"
|
||||||
|
},
|
||||||
|
|
||||||
|
"RegExpMatcherWrapper-class" : {
|
||||||
|
"title" : "RegExpMatcherWrapper Class"
|
||||||
|
},
|
||||||
|
|
||||||
|
"FunctionWrapper-class" : {
|
||||||
|
"title" : "FunctionWrapper Class"
|
||||||
|
},
|
||||||
|
|
||||||
|
"BaseException-var" : {
|
||||||
|
"title" : "BaseException Var"
|
||||||
|
},
|
||||||
|
|
||||||
|
"looseIdentical-function" : {
|
||||||
|
"title" : "looseIdentical Function"
|
||||||
|
},
|
||||||
|
|
||||||
|
"getMapKey-function" : {
|
||||||
|
"title" : "getMapKey Function"
|
||||||
|
},
|
||||||
|
|
||||||
|
"normalizeBlank-function" : {
|
||||||
|
"title" : "normalizeBlank Function"
|
||||||
|
},
|
||||||
|
|
||||||
|
"isJsObject-function" : {
|
||||||
|
"title" : "isJsObject Function"
|
||||||
|
},
|
||||||
|
|
||||||
|
"assertionsEnabled-function" : {
|
||||||
|
"title" : "assertionsEnabled Function"
|
||||||
|
},
|
||||||
|
|
||||||
|
"print-function" : {
|
||||||
|
"title" : "print Function"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Json-var" : {
|
||||||
|
"title" : "Json Var"
|
||||||
|
},
|
||||||
|
|
||||||
|
"DateWrapper-class" : {
|
||||||
|
"title" : "DateWrapper Class"
|
||||||
|
}
|
||||||
|
}
|
9
public/docs/js/latest/api/src/facade/math/_data.json
Normal file
9
public/docs/js/latest/api/src/facade/math/_data.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"Math-var" : {
|
||||||
|
"title" : "Math Var"
|
||||||
|
},
|
||||||
|
|
||||||
|
"NaN-var" : {
|
||||||
|
"title" : "NaN Var"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"reflector-var" : {
|
||||||
|
"title" : "reflector Var"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"ReflectionCapabilities-class" : {
|
||||||
|
"title" : "ReflectionCapabilities Class"
|
||||||
|
}
|
||||||
|
}
|
13
public/docs/js/latest/api/src/reflection/types/_data.json
Normal file
13
public/docs/js/latest/api/src/reflection/types/_data.json
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"SetterFn-var" : {
|
||||||
|
"title" : "SetterFn Var"
|
||||||
|
},
|
||||||
|
|
||||||
|
"GetterFn-var" : {
|
||||||
|
"title" : "GetterFn Var"
|
||||||
|
},
|
||||||
|
|
||||||
|
"MethodFn-var" : {
|
||||||
|
"title" : "MethodFn Var"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"HammerGesturesPlugin-class" : {
|
||||||
|
"title" : "HammerGesturesPlugin Class"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"XHRImpl-class" : {
|
||||||
|
"title" : "XHRImpl Class"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
{}
|
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"getTypeOf-function" : {
|
||||||
|
"title" : "getTypeOf Function"
|
||||||
|
},
|
||||||
|
|
||||||
|
"instantiateType-function" : {
|
||||||
|
"title" : "instantiateType Function"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
{}
|
53
public/docs/js/latest/api/src/test_lib/test_lib/_data.json
Normal file
53
public/docs/js/latest/api/src/test_lib/test_lib/_data.json
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
{
|
||||||
|
"afterEach-var" : {
|
||||||
|
"title" : "afterEach Var"
|
||||||
|
},
|
||||||
|
|
||||||
|
"expect-var" : {
|
||||||
|
"title" : "expect Var"
|
||||||
|
},
|
||||||
|
|
||||||
|
"IS_DARTIUM-var" : {
|
||||||
|
"title" : "IS_DARTIUM Var"
|
||||||
|
},
|
||||||
|
|
||||||
|
"AsyncTestCompleter-class" : {
|
||||||
|
"title" : "AsyncTestCompleter Class"
|
||||||
|
},
|
||||||
|
|
||||||
|
"describe-function" : {
|
||||||
|
"title" : "describe Function"
|
||||||
|
},
|
||||||
|
|
||||||
|
"ddescribe-function" : {
|
||||||
|
"title" : "ddescribe Function"
|
||||||
|
},
|
||||||
|
|
||||||
|
"xdescribe-function" : {
|
||||||
|
"title" : "xdescribe Function"
|
||||||
|
},
|
||||||
|
|
||||||
|
"beforeEach-function" : {
|
||||||
|
"title" : "beforeEach Function"
|
||||||
|
},
|
||||||
|
|
||||||
|
"beforeEachBindings-function" : {
|
||||||
|
"title" : "beforeEachBindings Function"
|
||||||
|
},
|
||||||
|
|
||||||
|
"it-function" : {
|
||||||
|
"title" : "it Function"
|
||||||
|
},
|
||||||
|
|
||||||
|
"xit-function" : {
|
||||||
|
"title" : "xit Function"
|
||||||
|
},
|
||||||
|
|
||||||
|
"iit-function" : {
|
||||||
|
"title" : "iit Function"
|
||||||
|
},
|
||||||
|
|
||||||
|
"SpyObject-class" : {
|
||||||
|
"title" : "SpyObject Class"
|
||||||
|
}
|
||||||
|
}
|
@ -13,8 +13,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(injector: Injector)
|
constructor(injector: Injector)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -29,12 +28,11 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(component: Type, {context = null, html = null}: {context:any, html: string} = {}, [object Object], [object Object], [object Object])
|
createView(component: Type, {context = null, html = null}: {context:any, html: string} = {}, [object Object], [object Object], [object Object])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Creates a [AppView] for the given component.
|
Creates an `AppView` for the given component.
|
||||||
|
|
||||||
Only either a component or a context needs to be specified but both can be provided for
|
Only either a component or a context needs to be specified but both can be provided for
|
||||||
advanced use cases (ie subclassing the context).
|
advanced use cases (ie subclassing the context).
|
||||||
@ -50,12 +48,11 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(component: Type, from: Type, to: Type, [object Object], [object Object], [object Object])
|
overrideDirective(component: Type, from: Type, to: Type, [object Object], [object Object], [object Object])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Overrides the directives from the component [View].
|
Overrides the directives from the component <a href="angular2/annotations/View-class"><code>View</code></a>.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -68,12 +65,11 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(component: Type, template: View, [object Object], [object Object])
|
overrideView(component: Type, template: View, [object Object], [object Object])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Overrides the [View] of a [Component].
|
Overrides the <a href="angular2/annotations/View-class"><code>View</code></a> of a <a href="angular2/annotations/Component-class"><code>Component</code></a>.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -86,13 +82,12 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(component: Type, html: string, [object Object], [object Object])
|
setInlineTemplate(component: Type, html: string, [object Object], [object Object])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Overrides only the html of a [Component].
|
Overrides only the html of a <a href="angular2/annotations/Component-class"><code>Component</code></a>.
|
||||||
All the other propoerties of the component's [View] are preserved.
|
All the other propoerties of the component's <a href="angular2/annotations/View-class"><code>View</code></a> are preserved.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
124
public/docs/js/latest/api/view/BaseQueryList-class.jade
Normal file
124
public/docs/js/latest/api/view/BaseQueryList-class.jade
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
|
||||||
|
p.
|
||||||
|
<span class="location-badge">exported from <a href="/angular2/view">angular2/view</a></span>
|
||||||
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/compiler/base_query_list.js#L12">angular2/src/core/compiler/base_query_list.js (line 12)</a>
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
Injectable Objects that contains a live list of child directives in the light Dom of a directive.
|
||||||
|
The directives are kept in depth-first pre-order traversal of the DOM.
|
||||||
|
|
||||||
|
In the future this class will implement an Observable interface.
|
||||||
|
For now it uses a plain list of observable callbacks.
|
||||||
|
|
||||||
|
.l-main-section
|
||||||
|
h2 Members
|
||||||
|
.l-sub-section
|
||||||
|
h3 constructor
|
||||||
|
|
||||||
|
|
||||||
|
pre.prettyprint
|
||||||
|
code.
|
||||||
|
constructor()
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3 [Symbol.iterator]
|
||||||
|
|
||||||
|
|
||||||
|
pre.prettyprint
|
||||||
|
code.
|
||||||
|
[Symbol.iterator]()
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3 add
|
||||||
|
|
||||||
|
|
||||||
|
pre.prettyprint
|
||||||
|
code.
|
||||||
|
add(obj)
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3 fireCallbacks
|
||||||
|
|
||||||
|
|
||||||
|
pre.prettyprint
|
||||||
|
code.
|
||||||
|
fireCallbacks()
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3 onChange
|
||||||
|
|
||||||
|
|
||||||
|
pre.prettyprint
|
||||||
|
code.
|
||||||
|
onChange(callback)
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3 removeCallback
|
||||||
|
|
||||||
|
|
||||||
|
pre.prettyprint
|
||||||
|
code.
|
||||||
|
removeCallback(callback)
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3 reset
|
||||||
|
|
||||||
|
|
||||||
|
pre.prettyprint
|
||||||
|
code.
|
||||||
|
reset(newList)
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
71
public/docs/js/latest/api/view/Compiler-class.jade
Normal file
71
public/docs/js/latest/api/view/Compiler-class.jade
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
|
||||||
|
p.
|
||||||
|
<span class="location-badge">exported from <a href="/angular2/view">angular2/view</a></span>
|
||||||
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/compiler/compiler.js#L46">angular2/src/core/compiler/compiler.js (line 46)</a>
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
.l-main-section
|
||||||
|
h2 Members
|
||||||
|
.l-sub-section
|
||||||
|
h3 constructor
|
||||||
|
|
||||||
|
|
||||||
|
pre.prettyprint
|
||||||
|
code.
|
||||||
|
constructor(reader: DirectiveMetadataReader, cache:CompilerCache, templateResolver: TemplateResolver, componentUrlMapper: ComponentUrlMapper, urlResolver: UrlResolver, renderer: renderApi.Renderer, protoViewFactory: ProtoViewFactory)
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3 buildRenderDirective
|
||||||
|
|
||||||
|
|
||||||
|
pre.prettyprint
|
||||||
|
code.
|
||||||
|
buildRenderDirective(directiveBinding)
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3 compile
|
||||||
|
|
||||||
|
|
||||||
|
pre.prettyprint
|
||||||
|
code.
|
||||||
|
compile(component: Type)
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3 compileInHost
|
||||||
|
|
||||||
|
|
||||||
|
pre.prettyprint
|
||||||
|
code.
|
||||||
|
compileInHost(componentTypeOrBinding:any)
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -13,8 +13,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(location:ElementRef, instance:any, componentView:AppView)
|
constructor(location:ElementRef, instance:any, componentView:AppView)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -15,8 +15,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(compiler:Compiler, directiveMetadataReader:DirectiveMetadataReader, viewFactory:ViewFactory, viewHydrator:AppViewHydrator)
|
constructor(compiler:Compiler, directiveMetadataReader:DirectiveMetadataReader, viewFactory:ViewFactory, viewHydrator:AppViewHydrator)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -31,8 +30,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(type:Type, location:ElementRef, injector:Injector = null)
|
loadIntoExistingLocation(type:Type, location:ElementRef, injector:Injector = null)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -49,8 +47,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(elementOrSelector:any, type:Type, location:ElementRef, injector:Injector = null)
|
loadIntoNewLocation(elementOrSelector:any, type:Type, location:ElementRef, injector:Injector = null)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
p.
|
p.
|
||||||
<span class="location-badge">exported from <a href="/angular2/view">angular2/view</a></span>
|
<span class="location-badge">exported from <a href="/angular2/view">angular2/view</a></span>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/compiler/element_injector.js#L25">angular2/src/core/compiler/element_injector.js (line 25)</a>
|
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/compiler/element_injector.js#L27">angular2/src/core/compiler/element_injector.js (line 27)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
|
||||||
@ -13,8 +13,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(elementInjector:ElementInjector)
|
constructor(elementInjector:ElementInjector)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -70,3 +69,15 @@ p.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3 viewContainer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -75,8 +75,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(callback)
|
onChange(callback)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
@ -92,8 +91,7 @@ p.
|
|||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
(callback)
|
removeCallback(callback)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user