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>
|
||||
|
||||
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
|
||||
|
|
|
@ -12,15 +12,15 @@
|
|||
},
|
||||
|
||||
"di" : {
|
||||
"title" : "Di"
|
||||
"title" : "Dependency Injection (DI)"
|
||||
},
|
||||
|
||||
"di_annotations" : {
|
||||
"title" : "Di Annotations"
|
||||
"title" : "DI Annotations"
|
||||
},
|
||||
|
||||
"di_errors" : {
|
||||
"title" : "Di Errors"
|
||||
"title" : "DI Errors"
|
||||
},
|
||||
|
||||
"directives" : {
|
||||
|
@ -35,18 +35,10 @@
|
|||
"title" : "Pipes"
|
||||
},
|
||||
|
||||
"template" : {
|
||||
"title" : "Template"
|
||||
},
|
||||
|
||||
"test" : {
|
||||
"title" : "Test"
|
||||
},
|
||||
|
||||
"test_lib" : {
|
||||
"title" : "Test Lib"
|
||||
},
|
||||
|
||||
"view" : {
|
||||
"title" : "View"
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
{}
|
|
@ -0,0 +1 @@
|
|||
{}
|
|
@ -63,8 +63,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
()
|
||||
|
||||
constructor()
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -37,8 +37,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(attributeName)
|
||||
|
||||
constructor(attributeName)
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
p.
|
||||
<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
|
||||
Directive that attaches behavior to DOM elements.
|
||||
|
@ -10,10 +10,10 @@ p.
|
|||
(see: http://en.wikipedia.org/wiki/Composition_over_inheritance)
|
||||
|
||||
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 ()
|
||||
|
||||
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
|
||||
- do not create their own evaluation context
|
||||
- do not have a template (and therefor do not create Shadow DOM)
|
||||
|
@ -69,7 +69,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
({
|
||||
constructor({
|
||||
selector,
|
||||
properties,
|
||||
events,
|
||||
|
@ -86,7 +86,6 @@ p.
|
|||
}={})
|
||||
|
||||
|
||||
|
||||
:markdown
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
p.
|
||||
<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
|
||||
Directive used for dynamically loading components.
|
||||
|
@ -56,7 +56,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
({
|
||||
constructor({
|
||||
selector,
|
||||
properties,
|
||||
events,
|
||||
|
@ -73,7 +73,6 @@ p.
|
|||
}={})
|
||||
|
||||
|
||||
|
||||
:markdown
|
||||
|
||||
|
||||
|
@ -86,7 +85,7 @@ p.
|
|||
|
||||
|
||||
: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
|
||||
code.
|
||||
()
|
||||
|
||||
constructor()
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -18,8 +18,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(propName)
|
||||
|
||||
constructor(propName)
|
||||
|
||||
|
||||
: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>
|
||||
|
||||
: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
|
||||
h2 Members
|
||||
|
@ -16,8 +16,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(directive)
|
||||
|
||||
constructor(directive)
|
||||
|
||||
|
||||
: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>
|
||||
|
||||
: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
|
||||
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
|
||||
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
|
||||
|
||||
|
@ -41,7 +41,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
({
|
||||
constructor({
|
||||
templateUrl,
|
||||
template,
|
||||
directives
|
||||
|
@ -52,7 +52,6 @@ p.
|
|||
})
|
||||
|
||||
|
||||
|
||||
:markdown
|
||||
|
||||
|
||||
|
@ -65,7 +64,7 @@ p.
|
|||
|
||||
|
||||
: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.
|
||||
|
||||
|
@ -96,7 +95,7 @@ p.
|
|||
|
||||
|
||||
: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.
|
||||
|
||||
|
@ -110,7 +109,7 @@ p.
|
|||
|
||||
|
||||
: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.
|
||||
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
|
||||
p.
|
||||
<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
|
||||
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.
|
||||
The [ViewContainer] is created as a result of `<template>` element, and represents a location in the current view
|
||||
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 <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.
|
||||
|
||||
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.
|
||||
|
||||
Since viewport directives are common in Angular, and using the full `<template>` element syntax is wordy, Angular
|
||||
|
@ -48,7 +48,7 @@ p.
|
|||
@Viewport({
|
||||
selector: '[unless]',
|
||||
properties: {
|
||||
'condition': 'unless'
|
||||
'unless': 'unless'
|
||||
}
|
||||
})
|
||||
export class Unless {
|
||||
|
@ -60,7 +60,7 @@ p.
|
|||
this.prevCondition = null;
|
||||
}
|
||||
|
||||
set condition(newCondition) {
|
||||
set unless(newCondition) {
|
||||
if (newCondition && (isBlank(this.prevCondition) || !this.prevCondition)) {
|
||||
this.prevCondition = true;
|
||||
this.viewContainer.clear();
|
||||
|
@ -102,7 +102,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
({
|
||||
constructor({
|
||||
selector,
|
||||
properties,
|
||||
events,
|
||||
|
@ -116,7 +116,6 @@ p.
|
|||
}={})
|
||||
|
||||
|
||||
|
||||
:markdown
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
p.
|
||||
<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
|
||||
Declare reusable UI building blocks for an application.
|
||||
|
@ -12,11 +12,11 @@ p.
|
|||
When a component is instantiated, Angular
|
||||
- creates a shadow DOM for the component.
|
||||
- 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.
|
||||
|
||||
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
|
||||
|
||||
|
@ -44,7 +44,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
({
|
||||
constructor({
|
||||
selector,
|
||||
properties,
|
||||
events,
|
||||
|
@ -63,7 +63,6 @@ p.
|
|||
}={})
|
||||
|
||||
|
||||
|
||||
:markdown
|
||||
|
||||
|
||||
|
@ -96,17 +95,17 @@ p.
|
|||
:markdown
|
||||
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.
|
||||
|
||||
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
|
||||
are children in the component's light DOM.
|
||||
|
||||
|
||||
The syntax for configuring the [injectables] injectable is identical to [Injector] injectable configuration. See
|
||||
[Injector] for additional detail.
|
||||
The syntax for configuring the `injectables` injectable is identical to <a href="angular2/di/Injector-class"><code>Injector</code></a> injectable configuration.
|
||||
See <a href="angular2/di/Injector-class"><code>Injector</code></a> for additional detail.
|
||||
|
||||
|
||||
## Simple Example
|
||||
|
|
|
@ -1,37 +1,37 @@
|
|||
|
||||
p.
|
||||
<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
|
||||
Directives allow you to attach behavior to elements in the DOM.
|
||||
|
||||
Directive is an abstract concept, instead use concrete directives: [Component], [DynamicComponent], [Decorator]
|
||||
or [Viewport].
|
||||
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 <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:
|
||||
|
||||
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,
|
||||
1. For each directive, the `ElementInjector` attempts to resolve the directive's constructor arguments.
|
||||
2. Angular instantiates directives for each matched element using `ElementInjector` in a depth-first order,
|
||||
as declared in the HTML.
|
||||
|
||||
## Understanding How Injection Works
|
||||
|
||||
There are three stages of injection resolution.
|
||||
- *Pre-existing Injectors*:
|
||||
- The terminal [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`.
|
||||
- The primordial 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
|
||||
- The platform injector resolves browser singleton resources, such as: cookies, title, location, and others.
|
||||
- *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.
|
||||
- *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.
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
|
||||
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.
|
||||
|
||||
To inject other directives, declare the constructor parameter as:
|
||||
- `directive:DirectiveType`: a directive on the current element only
|
||||
- `@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.
|
||||
- `@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].
|
||||
- `@Descendants query:Query<DirectiveType>`: A live collection of any 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 (will be implemented in later relaese).
|
||||
|
||||
To inject element-specific special objects, declare the constructor parameter as:
|
||||
- `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.
|
||||
|
||||
## Example
|
||||
|
@ -182,32 +182,35 @@ p.
|
|||
`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
|
||||
directives, a directive can't simply inject the list of child directives. Instead, the directive asynchronously
|
||||
injects a [Query], which updates as children are added, removed, or moved by any [ViewPort] directive such as a
|
||||
`for`, an `if`, or a `switch`.
|
||||
directives, a directive can't simply inject the list of child directives. Instead, the directive
|
||||
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
|
||||
<a href="angular2/annotations/Viewport-class"><code>Viewport</code></a> directive such as a `for`, an `if`, or a `switch`.
|
||||
|
||||
```
|
||||
@Decorator({ selector: '[my-directive]' })
|
||||
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
|
||||
not be included, because it is not a direct child.
|
||||
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`
|
||||
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.
|
||||
|
||||
```
|
||||
@Decorator({ selector: '[my-directive]' })
|
||||
class MyDirective {
|
||||
constructor(@Children() dependencies:Query<Maker>) {
|
||||
constructor(@QueryDescendents(Marker) dependencies:QueryList<Maker>) {
|
||||
}
|
||||
}
|
||||
```
|
||||
|
@ -239,7 +242,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
({
|
||||
constructor({
|
||||
selector,
|
||||
properties,
|
||||
events,
|
||||
|
@ -254,7 +257,6 @@ p.
|
|||
}={})
|
||||
|
||||
|
||||
|
||||
:markdown
|
||||
|
||||
|
||||
|
@ -298,14 +300,13 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(hook:string)
|
||||
|
||||
hasLifecycleHook(hook:string)
|
||||
|
||||
|
||||
: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.
|
||||
- `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.
|
||||
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:
|
||||
- `$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.
|
||||
[TO BE IMPLEMENTED]
|
||||
(will be implemented in later release)
|
||||
|
||||
|
||||
## Syntax
|
||||
|
@ -380,7 +382,7 @@ p.
|
|||
:markdown
|
||||
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.
|
||||
- `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.
|
||||
|
||||
|
||||
|
@ -454,7 +456,9 @@ p.
|
|||
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
|
||||
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({
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
p(class="module") exported from <a href="/angular2/annotations">angular2/annotations</a>
|
||||
|
||||
: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
|
||||
|
||||
|
|
|
@ -8,17 +8,17 @@ p.
|
|||
|
||||
Angular implements the following change detection strategies by default:
|
||||
|
||||
- [dynamicChangeDetection]: slower, but does not require `eval()`.
|
||||
- [jitChangeDetection]: faster, but requires `eval()`.
|
||||
- <a href="angular2/change_detection/DynamicChangeDetection-class"><code>DynamicChangeDetection</code></a>: slower, but does not require `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.
|
||||
|
||||
In Dart, use `dynamicChangeDetection` during development. The Angular transformer generates an analog to the
|
||||
`jitChangeDetection` strategy at compile time.
|
||||
In Dart, use `DynamicChangeDetection` during development. The Angular transformer generates an analog to the
|
||||
`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
|
||||
```javascript
|
||||
|
@ -32,8 +32,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(name:string, changeControlStrategy:string=DEFAULT)
|
||||
|
||||
createProtoChangeDetector(name:string, changeControlStrategy:string=DEFAULT)
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -6,7 +6,7 @@ p.
|
|||
:markdown
|
||||
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.
|
||||
|
||||
.l-main-section
|
||||
|
@ -17,8 +17,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(cd:ChangeDetector)
|
||||
|
||||
constructor(cd:ChangeDetector)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -33,8 +32,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
()
|
||||
|
||||
detach()
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -52,8 +50,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
()
|
||||
|
||||
reattach()
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -72,8 +69,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
()
|
||||
|
||||
requestCheck()
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
p.
|
||||
<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
|
||||
|
||||
|
@ -13,8 +13,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(registry:PipeRegistry)
|
||||
|
||||
constructor(registry:PipeRegistry)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -29,8 +28,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(name:string, changeControlStrategy:string = DEFAULT)
|
||||
|
||||
createProtoChangeDetector(name:string, changeControlStrategy:string = DEFAULT)
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
p.
|
||||
<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
|
||||
|
||||
|
@ -13,8 +13,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(registry:PipeRegistry)
|
||||
|
||||
constructor(registry:PipeRegistry)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -29,8 +28,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(name:string, changeControlStrategy:string = DEFAULT)
|
||||
|
||||
createProtoChangeDetector(name:string, changeControlStrategy:string = DEFAULT)
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -6,14 +6,14 @@ p.
|
|||
:markdown
|
||||
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.
|
||||
|
||||
Each Angular application has a single `LifeCycle` instance.
|
||||
|
||||
# Example
|
||||
|
||||
This is a contrived example, since the bootstrap automatically runs inside of the [Zone], which invokes
|
||||
This is a contrived example, since the bootstrap automatically runs inside of the `Zone`, which invokes
|
||||
`lifecycle.tick()` on your behalf.
|
||||
|
||||
```javascript
|
||||
|
@ -33,8 +33,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(exceptionHandler:ExceptionHandler, changeDetector:ChangeDetector = null, enforceNoNewChanges:boolean = false)
|
||||
|
||||
constructor(exceptionHandler:ExceptionHandler, changeDetector:ChangeDetector = null, enforceNoNewChanges:boolean = false)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -49,8 +48,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(zone:VmTurnZone, changeDetector:ChangeDetector = null)
|
||||
|
||||
registerWith(zone:VmTurnZone, changeDetector:ChangeDetector = null)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -66,8 +64,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
()
|
||||
|
||||
tick()
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -38,8 +38,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(error, stackTrace = null, reason = null)
|
||||
|
||||
call(error, stackTrace = null, reason = null)
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -17,8 +17,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(view, boundElementIndex)
|
||||
|
||||
constructor(view, boundElementIndex)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -45,8 +44,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(name:string)
|
||||
|
||||
getAttribute(name:string)
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -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" : {
|
||||
"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
|
||||
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
|
||||
`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.
|
||||
5. It instantiates the specified component.
|
||||
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
|
||||
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."
|
||||
|
||||
|
||||
|
@ -89,25 +89,25 @@
|
|||
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.
|
||||
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
|
||||
all shared services, and each angular application injector has the primordial injector as its parent.
|
||||
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 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 injector's services as private to that application.
|
||||
|
||||
|
||||
# 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(...)`.
|
||||
- [componentInjectableBindings]: An additional set of bindings that can be added to the [Component.injectables] to
|
||||
override default injection behavior.
|
||||
- [errorReporter]: `function(exception:any, stackTrace:string)` a default error reporter for unhandled exceptions.
|
||||
- `componentInjectableBindings`: An additional set of bindings that can be added to `injectables` for the
|
||||
<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.
|
||||
|
||||
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>
|
||||
|
||||
: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
|
||||
|
||||
|
@ -26,7 +26,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(token, {
|
||||
constructor(token, {
|
||||
toClass,
|
||||
toValue,
|
||||
toAlias,
|
||||
|
@ -36,7 +36,6 @@ p.
|
|||
})
|
||||
|
||||
|
||||
|
||||
:markdown
|
||||
|
||||
|
||||
|
@ -49,8 +48,8 @@ p.
|
|||
|
||||
|
||||
:markdown
|
||||
Used in conjunction with `toFactory` or `toAsyncFactory` and specifies the `token`s which should be injected
|
||||
into the factory function.
|
||||
Used in conjunction with `toFactory` or `toAsyncFactory` and specifies a set of dependencies (as `token`s) which
|
||||
should be injected into the factory function.
|
||||
|
||||
|
||||
|
||||
|
@ -75,12 +74,13 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
()
|
||||
|
||||
resolve()
|
||||
|
||||
|
||||
: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
|
||||
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
|
||||
`toClass` where a separet instance of `toClass` will be returned.)
|
||||
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 separate instance of `toClass` is returned.
|
||||
|
||||
|
||||
|
||||
|
@ -133,7 +133,7 @@ p.
|
|||
|
||||
|
||||
: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'));
|
||||
```
|
||||
|
||||
The interesting thing to note is that event thougt `Numeber` has an async factory, the `String` factory
|
||||
function takes the resolved value. This shows that the [Injector] delays executing of the `String` factory
|
||||
until after the `Number` is resolved. This can only be done if the `token` is retrive
|
||||
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 <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 retrieved using the
|
||||
`asyncGet` API in the <a href="angular2/di/Injector-class"><code>Injector</code></a>.
|
||||
|
||||
|
||||
|
||||
|
@ -164,11 +165,11 @@ p.
|
|||
|
||||
|
||||
: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
|
||||
|
||||
|
@ -202,7 +203,7 @@ p.
|
|||
|
||||
|
||||
: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
|
||||
Bind a key to a value.
|
||||
Binds a key to a value.
|
||||
|
||||
|
||||
|
||||
|
@ -249,7 +250,7 @@ p.
|
|||
|
||||
|
||||
:markdown
|
||||
Token used when retriving this binding. Usually the [Type].
|
||||
Token used when retrieving this binding. Usually the `Type`.
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
|
||||
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#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
|
||||
Helper class for [bind] function.
|
||||
Helper class for the <a href="angular2/di/bind-function"><code>bind</code></a> function.
|
||||
|
||||
.l-main-section
|
||||
h2 Members
|
||||
.l-sub-section
|
||||
|
@ -13,8 +14,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(token)
|
||||
|
||||
constructor(token)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -29,19 +29,18 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(aliasToken)
|
||||
|
||||
toAlias(aliasToken)
|
||||
|
||||
|
||||
: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
|
||||
`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
|
||||
|
||||
|
@ -75,12 +74,11 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(factoryFunction:Function, dependencies:List = null)
|
||||
|
||||
toAsyncFactory(factoryFunction:Function, dependencies:List = null)
|
||||
|
||||
|
||||
: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'));
|
||||
```
|
||||
|
||||
The interesting thing to note is that event thougt `Numeber` has an async factory, the `String` factory
|
||||
function takes the resolved value. This shows that the [Injector] delays executing of the `String` factory
|
||||
until after the `Number` is resolved. This can only be done if the `token` is retrive
|
||||
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 <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 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
|
||||
code.
|
||||
(type:Type)
|
||||
|
||||
toClass(type:Type)
|
||||
|
||||
|
||||
: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
|
||||
|
||||
|
@ -153,12 +151,11 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(factoryFunction:Function, dependencies:List = null)
|
||||
|
||||
toFactory(factoryFunction:Function, dependencies:List = null)
|
||||
|
||||
|
||||
: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
|
||||
code.
|
||||
(value)
|
||||
|
||||
toValue(value)
|
||||
|
||||
|
||||
:markdown
|
||||
Bind a key to a value.
|
||||
Binds a key to a value.
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -47,8 +47,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
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
|
||||
|
@ -63,12 +62,11 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(token, [object Object])
|
||||
|
||||
asyncGet(token, [object Object])
|
||||
|
||||
|
||||
: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
|
||||
code.
|
||||
(bindings:List<ResolvedBinding>, [object Object])
|
||||
|
||||
createChildFromResolved(bindings:List<ResolvedBinding>, [object Object])
|
||||
|
||||
|
||||
: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
|
||||
code.
|
||||
(bindings:List<ResolvedBinding>, {defaultBindings=false}={}, [object Object], [object Object])
|
||||
|
||||
fromResolvedBindings(bindings:List<ResolvedBinding>, {defaultBindings=false}={}, [object Object], [object Object])
|
||||
|
||||
|
||||
: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.
|
||||
|
||||
|
||||
|
@ -118,12 +114,11 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(token, [object Object])
|
||||
|
||||
get(token, [object Object])
|
||||
|
||||
|
||||
:markdown
|
||||
Used to retrieve an instance from the injector.
|
||||
Retrieves an instance from the injector.
|
||||
|
||||
|
||||
|
||||
|
@ -136,12 +131,11 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(token, [object Object])
|
||||
|
||||
getOptional(token, [object Object])
|
||||
|
||||
|
||||
:markdown
|
||||
Used to retrieve an instance from the injector.
|
||||
Retrieves an instance from the injector.
|
||||
|
||||
|
||||
|
||||
|
@ -154,15 +148,15 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(bindings:List, [object Object])
|
||||
|
||||
resolve(bindings:List, [object Object])
|
||||
|
||||
|
||||
: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
|
||||
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
|
||||
code.
|
||||
(bindings:List, {defaultBindings=false}={}, [object Object], [object Object])
|
||||
|
||||
resolveAndCreate(bindings:List, {defaultBindings=false}={}, [object Object], [object Object])
|
||||
|
||||
|
||||
:markdown
|
||||
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
|
||||
code.
|
||||
(bindings:List, [object Object])
|
||||
|
||||
resolveAndCreateChild(bindings:List, [object Object])
|
||||
|
||||
|
||||
: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
|
||||
list of [ResolvedBinding]s. The resolution can be cached [Injector.resolve] for performance sensitive
|
||||
code.
|
||||
|
||||
See: [Injector.resolve].
|
||||
A resolution is a process of flattening multiple nested lists and converting individual bindings into a
|
||||
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.
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
: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:
|
||||
- system wide unique [id].
|
||||
- [token] usually the [Type] of the instance.
|
||||
Keys have:
|
||||
- a system-wide unique `id`.
|
||||
- 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
|
||||
index in arrays rather ther look up items in maps.
|
||||
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
|
||||
injector to index in arrays rather than looking up items in maps.
|
||||
|
||||
.l-main-section
|
||||
h2 Members
|
||||
|
@ -21,8 +21,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(token, id)
|
||||
|
||||
constructor(token, id)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -37,12 +36,11 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(token)
|
||||
|
||||
get(token)
|
||||
|
||||
|
||||
:markdown
|
||||
Retrieve a [Key] for a token.
|
||||
Retrieves a `Key` for a token.
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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"
|
||||
},
|
||||
|
||||
"ResolvedBinding-class" : {
|
||||
"title" : "ResolvedBinding Class"
|
||||
},
|
||||
|
||||
"bind-function" : {
|
||||
"title" : "bind Function"
|
||||
},
|
||||
|
|
|
@ -8,7 +8,16 @@
|
|||
exported from <a href="/angular2/di">angular2/di</a>
|
||||
|
||||
: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.
|
||||
<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
|
||||
`DependencyAnnotation` is used by the framework to extend DI.
|
||||
|
||||
Only annotations implementing `DependencyAnnotation` will be added
|
||||
to the list of dependency properties.
|
||||
Only annotations implementing `DependencyAnnotation` are added to the list of dependency properties.
|
||||
|
||||
For example:
|
||||
|
||||
|
@ -37,8 +36,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
()
|
||||
|
||||
constructor()
|
||||
|
||||
|
||||
: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>
|
||||
|
||||
:markdown
|
||||
A parameter annotation that creates a synchronous eager dependency.
|
||||
A parameter annotation that specifies a dependency.
|
||||
|
||||
```
|
||||
class AComponent {
|
||||
|
@ -20,8 +20,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(token)
|
||||
|
||||
constructor(token)
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -22,8 +22,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(token)
|
||||
|
||||
constructor(token)
|
||||
|
||||
|
||||
: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>
|
||||
|
||||
:markdown
|
||||
A parameter annotation that creates an asynchronous eager dependency.
|
||||
A parameter annotation that specifies a `Promise` of a dependency.
|
||||
|
||||
```
|
||||
class AComponent {
|
||||
|
@ -22,8 +22,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(token)
|
||||
|
||||
constructor(token)
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
|
||||
p.
|
||||
<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
|
||||
A marker annotation that marks a class as available to `Injector`s for creation. Used by tooling for generating
|
||||
constructor stubs.
|
||||
A marker annotation that marks a class as available to `Injector` for creation. Used by tooling for
|
||||
generating constructor stubs.
|
||||
|
||||
```
|
||||
class NeedsService {
|
||||
|
@ -23,8 +23,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
()
|
||||
|
||||
constructor()
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
|
||||
p.
|
||||
<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
|
||||
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 {
|
||||
constructor(@Optional() aService:MyService) {
|
||||
|
@ -21,8 +23,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
()
|
||||
|
||||
constructor()
|
||||
|
||||
|
||||
: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>
|
||||
|
||||
: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
|
||||
|
||||
|
@ -22,8 +22,8 @@ p.
|
|||
}).toThrowError(AsycBindingError);
|
||||
```
|
||||
|
||||
The above example throws because `String` dependes no `Numeber` which is async. If any binding in the dependency
|
||||
graph is async then the graph can only be retrieved using `asyncGet` API.
|
||||
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 the `asyncGet` API.
|
||||
|
||||
.l-main-section
|
||||
h2 Members
|
||||
|
@ -33,8 +33,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(key)
|
||||
|
||||
constructor(key)
|
||||
|
||||
|
||||
: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>
|
||||
|
||||
:markdown
|
||||
Throw when dependencies from a cyle.
|
||||
Thrown when dependencies form a cycle.
|
||||
|
||||
## 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
|
||||
h2 Members
|
||||
|
@ -27,8 +27,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(key)
|
||||
|
||||
constructor(key)
|
||||
|
||||
|
||||
: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>
|
||||
|
||||
: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.
|
||||
|
||||
.l-main-section
|
||||
|
@ -17,8 +17,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(originalException, key)
|
||||
|
||||
constructor(originalException, key)
|
||||
|
||||
|
||||
: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>
|
||||
|
||||
: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
|
||||
h2 Members
|
||||
|
@ -14,8 +14,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(binding)
|
||||
|
||||
constructor(binding)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -42,8 +41,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
()
|
||||
|
||||
toString()
|
||||
|
||||
|
||||
: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>
|
||||
|
||||
: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
|
||||
constructor.
|
||||
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
|
||||
the constructor.
|
||||
|
||||
.l-main-section
|
||||
h2 Members
|
||||
|
@ -17,8 +17,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(typeOrFunc)
|
||||
|
||||
constructor(typeOrFunc)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -45,8 +44,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
()
|
||||
|
||||
toString()
|
||||
|
||||
|
||||
: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" : {
|
||||
"title" : "ProviderError Class"
|
||||
"AbstractBindingError-class" : {
|
||||
"title" : "AbstractBindingError Class"
|
||||
},
|
||||
|
||||
"NoProviderError-class" : {
|
||||
"title" : "NoProviderError Class"
|
||||
"NoBindingError-class" : {
|
||||
"title" : "NoBindingError Class"
|
||||
},
|
||||
|
||||
"AsyncBindingError-class" : {
|
||||
|
|
|
@ -41,8 +41,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(viewContainer:ViewContainer)
|
||||
|
||||
constructor(viewContainer:ViewContainer)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -57,8 +56,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(tuples, viewContainer)
|
||||
|
||||
bulkInsert(tuples, viewContainer)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -74,8 +72,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(tuples, viewContainer)
|
||||
|
||||
bulkRemove(tuples, viewContainer)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -91,8 +88,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(changes)
|
||||
|
||||
iterableChanges(changes)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -108,8 +104,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(view, record)
|
||||
|
||||
perViewChange(view, record)
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -32,8 +32,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(viewContainer: ViewContainer)
|
||||
|
||||
constructor(viewContainer: ViewContainer)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -48,8 +47,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(newCondition)
|
||||
|
||||
condition(newCondition)
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -36,8 +36,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
()
|
||||
|
||||
constructor()
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -52,8 +51,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(value)
|
||||
|
||||
value(value)
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -22,8 +22,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(viewContainer: ViewContainer, sswitch: Switch)
|
||||
|
||||
constructor(viewContainer: ViewContainer, sswitch: Switch)
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -26,8 +26,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(viewContainer: ViewContainer, sswitch: Switch)
|
||||
|
||||
constructor(viewContainer: ViewContainer, sswitch: Switch)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -42,8 +41,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(value)
|
||||
|
||||
when(value)
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -20,8 +20,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(cd:ControlDirective, setCheckedProperty:Function)
|
||||
|
||||
constructor(cd:ControlDirective, setCheckedProperty:Function)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -48,8 +47,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(value)
|
||||
|
||||
writeValue(value)
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -6,8 +6,8 @@ p.
|
|||
:markdown
|
||||
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]
|
||||
and [ControlArray].
|
||||
`Control` is one of the three fundamental building blocks used to define forms in Angular, along with
|
||||
<a href="angular2/forms/ControlGroup-class"><code>ControlGroup</code></a> and <a href="angular2/forms/ControlArray-class"><code>ControlArray</code></a>.
|
||||
|
||||
.l-main-section
|
||||
h2 Members
|
||||
|
@ -17,8 +17,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(value:any, validator:Function = Validators.nullValidator)
|
||||
|
||||
constructor(value:any, validator:Function = Validators.nullValidator)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -33,8 +32,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(value:any)
|
||||
|
||||
updateValue(value:any)
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
|
||||
p.
|
||||
<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
|
||||
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
|
||||
group is invalid, the entire group is invalid. Similarly, if a control changes its value, the entire group changes
|
||||
as well.
|
||||
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
|
||||
in a group is invalid, the entire group is invalid. Similarly, if a control changes its value, the entire group
|
||||
changes as well.
|
||||
|
||||
`ControlArray` is one of the three fundamental building blocks used to define forms in Angular, along with [Control]
|
||||
and [ControlGroup]. [ControlGroup] can also contain other controls, but is of fixed length.
|
||||
`ControlArray` is one of the three fundamental building blocks used to define forms in Angular, along with
|
||||
<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
|
||||
h2 Members
|
||||
|
@ -21,8 +22,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(controls:List<AbstractControl>, validator:Function = Validators.array)
|
||||
|
||||
constructor(controls:List<AbstractControl>, validator:Function = Validators.array)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -37,8 +37,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(index:number)
|
||||
|
||||
at(index:number)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -66,8 +65,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(index:number, control:AbstractControl)
|
||||
|
||||
insert(index:number, control:AbstractControl)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -95,8 +93,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(control:AbstractControl)
|
||||
|
||||
push(control:AbstractControl)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -112,8 +109,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(index:number)
|
||||
|
||||
removeAt(index:number)
|
||||
|
||||
|
||||
: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
|
||||
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.
|
||||
|
||||
```
|
||||
|
@ -39,8 +39,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(groupDirective:ControlGroupDirective, valueAccessor:DefaultValueAccessor)
|
||||
|
||||
constructor(groupDirective:ControlGroupDirective, valueAccessor:DefaultValueAccessor)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -67,8 +66,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(_)
|
||||
|
||||
onChange(_)
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
|
||||
p.
|
||||
<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
|
||||
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
|
||||
group is invalid, the entire group is invalid. Similarly, if a control changes its value, the entire group changes
|
||||
as well.
|
||||
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
|
||||
in a group is invalid, the entire group is invalid. Similarly, if a control changes its value, the entire group
|
||||
changes as well.
|
||||
|
||||
`ControlGroup` is one of the three fundamental building blocks used to define forms in Angular, along with [Control]
|
||||
and [ControlArray]. [ControlArray] can also contain other controls, but is of variable length.
|
||||
`ControlGroup` is one of the three fundamental building blocks used to define forms in Angular, along with
|
||||
<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
|
||||
h2 Members
|
||||
|
@ -21,8 +22,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(controls:StringMap, optionals:StringMap = null, validator:Function = Validators.group)
|
||||
|
||||
constructor(controls:StringMap, optionals:StringMap = null, validator:Function = Validators.group)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -37,8 +37,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(controlName:string)
|
||||
|
||||
contains(controlName:string)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -66,8 +65,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(controlName:string)
|
||||
|
||||
exclude(controlName:string)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -83,8 +81,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(controlName:string)
|
||||
|
||||
include(controlName:string)
|
||||
|
||||
|
||||
: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
|
||||
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.
|
||||
|
||||
```
|
||||
|
@ -49,8 +49,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(groupDirective:ControlGroupDirective)
|
||||
|
||||
constructor(groupDirective:ControlGroupDirective)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -65,8 +64,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(c:ControlDirective)
|
||||
|
||||
addDirective(c:ControlDirective)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -82,8 +80,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(controlGroup)
|
||||
|
||||
controlGroup(controlGroup)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -99,8 +96,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(name:string)
|
||||
|
||||
findControl(name:string)
|
||||
|
||||
|
||||
: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>
|
||||
|
||||
: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.
|
||||
|
||||
|
@ -21,8 +21,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(setValueProperty:Function)
|
||||
|
||||
constructor(setValueProperty:Function)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -49,8 +48,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(value)
|
||||
|
||||
writeValue(value)
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -8,8 +8,8 @@ p.
|
|||
|
||||
# Example
|
||||
|
||||
This example creates a [ControlGroup] that consists of a `login` [Control], and a nested [ControlGroup] that defines
|
||||
a `password` and a `passwordConfirmation` [Control].
|
||||
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 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({
|
||||
|
@ -30,8 +30,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(controlsConfig:List, validator:Function = null)
|
||||
|
||||
array(controlsConfig:List, validator:Function = null)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -47,8 +46,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(value, validator:Function = null)
|
||||
|
||||
control(value, validator:Function = null)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -64,8 +62,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(controlsConfig, extra = null)
|
||||
|
||||
group(controlsConfig, extra = null)
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -20,8 +20,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(c:modelModule.ControlArray)
|
||||
|
||||
array(c:modelModule.ControlArray)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -37,8 +36,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(validators:List<Function>)
|
||||
|
||||
compose(validators:List<Function>)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -54,8 +52,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(c:modelModule.ControlGroup)
|
||||
|
||||
group(c:modelModule.ControlGroup)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -71,8 +68,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(c:any)
|
||||
|
||||
nullValidator(c:any)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -88,8 +84,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(c:modelModule.Control)
|
||||
|
||||
required(c:modelModule.Control)
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -13,8 +13,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(item)
|
||||
|
||||
constructor(item)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -65,8 +64,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
()
|
||||
|
||||
toString()
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -13,8 +13,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
()
|
||||
|
||||
constructor()
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -29,8 +28,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(collection)
|
||||
|
||||
check(collection)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -58,8 +56,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(fn:Function)
|
||||
|
||||
forEachAddedItem(fn:Function)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -75,8 +72,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(fn:Function)
|
||||
|
||||
forEachItem(fn:Function)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -92,8 +88,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(fn:Function)
|
||||
|
||||
forEachMovedItem(fn:Function)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -109,8 +104,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(fn:Function)
|
||||
|
||||
forEachPreviousItem(fn:Function)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -126,8 +120,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(fn:Function)
|
||||
|
||||
forEachRemovedItem(fn:Function)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -167,8 +160,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(obj)
|
||||
|
||||
supports(obj)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -184,8 +176,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(obj)
|
||||
|
||||
supportsObj(obj)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -201,8 +192,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
()
|
||||
|
||||
toString()
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -218,8 +208,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(collection)
|
||||
|
||||
transform(collection)
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -13,8 +13,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(key)
|
||||
|
||||
constructor(key)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -65,8 +64,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
()
|
||||
|
||||
toString()
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -13,8 +13,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
()
|
||||
|
||||
constructor()
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -29,8 +28,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(map)
|
||||
|
||||
check(map)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -46,8 +44,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(fn:Function)
|
||||
|
||||
forEachAddedItem(fn:Function)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -63,8 +60,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(fn:Function)
|
||||
|
||||
forEachChangedItem(fn:Function)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -80,8 +76,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(fn:Function)
|
||||
|
||||
forEachItem(fn:Function)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -97,8 +92,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(fn:Function)
|
||||
|
||||
forEachPreviousItem(fn:Function)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -114,8 +108,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(fn:Function)
|
||||
|
||||
forEachRemovedItem(fn:Function)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -143,8 +136,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(obj)
|
||||
|
||||
supports(obj)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -160,8 +152,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(obj)
|
||||
|
||||
supportsObj(obj)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -177,8 +168,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
()
|
||||
|
||||
toString()
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -194,8 +184,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(map)
|
||||
|
||||
transform(map)
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -13,8 +13,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(cdRef)
|
||||
|
||||
create(cdRef)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -30,8 +29,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(obj)
|
||||
|
||||
supports(obj)
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -13,8 +13,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
()
|
||||
|
||||
constructor()
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -41,8 +40,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(obj)
|
||||
|
||||
supports(obj)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -58,8 +56,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(obj)
|
||||
|
||||
supportsObj(obj)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -75,8 +72,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(value)
|
||||
|
||||
transform(value)
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -13,8 +13,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(cdRef)
|
||||
|
||||
create(cdRef)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -30,8 +29,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(obj)
|
||||
|
||||
supports(obj)
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -6,7 +6,7 @@ p.
|
|||
:markdown
|
||||
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
|
||||
|
||||
|
@ -30,8 +30,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
()
|
||||
|
||||
onDestroy()
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -47,8 +46,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(obj)
|
||||
|
||||
supports(obj)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -64,8 +62,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(value:any)
|
||||
|
||||
transform(value:any)
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
{
|
||||
"keyValDiff-var" : {
|
||||
"title" : "keyValDiff Var"
|
||||
},
|
||||
|
||||
"iterableDiff-var" : {
|
||||
"title" : "iterableDiff Var"
|
||||
},
|
||||
|
||||
"IterableChanges-class" : {
|
||||
"title" : "IterableChanges Class"
|
||||
},
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
@ -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" : {
|
||||
"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" : {
|
||||
"title" : "ProviderError Class"
|
||||
"AbstractBindingError-class" : {
|
||||
"title" : "AbstractBindingError Class"
|
||||
},
|
||||
|
||||
"NoProviderError-class" : {
|
||||
"title" : "NoProviderError Class"
|
||||
"NoBindingError-class" : {
|
||||
"title" : "NoBindingError Class"
|
||||
},
|
||||
|
||||
"AsyncBindingError-class" : {
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"BrowserDomAdapter-class" : {
|
||||
"title" : "BrowserDomAdapter Class"
|
||||
}
|
||||
}
|
|
@ -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"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"document-var" : {
|
||||
"title" : "document Var"
|
||||
},
|
||||
|
||||
"location-var" : {
|
||||
"title" : "location Var"
|
||||
},
|
||||
|
||||
"gc-var" : {
|
||||
"title" : "gc Var"
|
||||
}
|
||||
}
|
|
@ -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"
|
||||
}
|
||||
}
|
|
@ -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"
|
||||
}
|
||||
}
|
|
@ -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"
|
||||
}
|
||||
}
|
|
@ -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 @@
|
|||
{}
|
|
@ -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
|
||||
code.
|
||||
(injector: Injector)
|
||||
|
||||
constructor(injector: Injector)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -29,12 +28,11 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
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
|
||||
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
|
||||
advanced use cases (ie subclassing the context).
|
||||
|
@ -50,12 +48,11 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
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
|
||||
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
|
||||
code.
|
||||
(component: Type, template: View, [object Object], [object Object])
|
||||
|
||||
overrideView(component: Type, template: View, [object Object], [object Object])
|
||||
|
||||
|
||||
: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
|
||||
code.
|
||||
(component: Type, html: string, [object Object], [object Object])
|
||||
|
||||
setInlineTemplate(component: Type, html: string, [object Object], [object Object])
|
||||
|
||||
|
||||
:markdown
|
||||
Overrides only the html of a [Component].
|
||||
All the other propoerties of the component's [View] are preserved.
|
||||
Overrides only the html of a <a href="angular2/annotations/Component-class"><code>Component</code></a>.
|
||||
All the other propoerties of the component's <a href="angular2/annotations/View-class"><code>View</code></a> are preserved.
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
code.
|
||||
(location:ElementRef, instance:any, componentView:AppView)
|
||||
|
||||
constructor(location:ElementRef, instance:any, componentView:AppView)
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -15,8 +15,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(compiler:Compiler, directiveMetadataReader:DirectiveMetadataReader, viewFactory:ViewFactory, viewHydrator:AppViewHydrator)
|
||||
|
||||
constructor(compiler:Compiler, directiveMetadataReader:DirectiveMetadataReader, viewFactory:ViewFactory, viewHydrator:AppViewHydrator)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -31,8 +30,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(type:Type, location:ElementRef, injector:Injector = null)
|
||||
|
||||
loadIntoExistingLocation(type:Type, location:ElementRef, injector:Injector = null)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -49,8 +47,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(elementOrSelector:any, type:Type, location:ElementRef, injector:Injector = null)
|
||||
|
||||
loadIntoNewLocation(elementOrSelector:any, type:Type, location:ElementRef, injector:Injector = null)
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
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/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
|
||||
|
||||
|
@ -13,8 +13,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(elementInjector:ElementInjector)
|
||||
|
||||
constructor(elementInjector:ElementInjector)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -70,3 +69,15 @@ p.
|
|||
|
||||
|
||||
|
||||
|
||||
.l-sub-section
|
||||
h3 viewContainer
|
||||
|
||||
|
||||
|
||||
:markdown
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -75,8 +75,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(callback)
|
||||
|
||||
onChange(callback)
|
||||
|
||||
|
||||
:markdown
|
||||
|
@ -92,8 +91,7 @@ p.
|
|||
|
||||
pre.prettyprint
|
||||
code.
|
||||
(callback)
|
||||
|
||||
removeCallback(callback)
|
||||
|
||||
|
||||
:markdown
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue