docs(alpha-37): API doc update for alpha 37

This commit is contained in:
Naomi Black 2015-09-11 20:41:40 -07:00
parent 8f2c621fbd
commit b821f7fa5f
272 changed files with 0 additions and 18312 deletions

View File

@ -1,36 +0,0 @@
p.location-badge.
exported from <a href='../change_detection'>angular2/change_detection</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/change_detection/exceptions.ts#L17-L34">angular2/src/core/change_detection/exceptions.ts (line 17)</a>
:markdown
Change detection enables data binding in Angular.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(exp: string, originalException: any, originalStack: any, context: any)
:markdown
.l-sub-section
h3 location
:markdown
Location of the expression.

View File

@ -1,103 +0,0 @@
p.location-badge.
exported from <a href='../change_detection'>angular2/change_detection</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/change_detection/constants.ts#L2-L43">angular2/src/core/change_detection/constants.ts (line 2)</a>
:markdown
Change detection enables data binding in Angular.
.l-main-section
h2 Members
.l-sub-section
h3 CheckOnce
:markdown
`CheckedOnce` means that after calling detectChanges the mode of the change detector
will become `Checked`.
.l-sub-section
h3 Checked
:markdown
`Checked` means that the change detector should be skipped until its mode changes to
`CheckOnce`.
.l-sub-section
h3 CheckAlways
:markdown
`CheckAlways` means that after calling detectChanges the mode of the change detector
will remain `CheckAlways`.
.l-sub-section
h3 Detached
:markdown
`Detached` means that the change detector sub tree is not a part of the main tree and
should be skipped.
.l-sub-section
h3 OnPush
:markdown
`OnPush` means that the change detector's mode will be set to `CheckOnce` during hydration.
.l-sub-section
h3 Default
:markdown
`Default` means that the change detector's mode will be set to `CheckAlways` during hydration.
.l-sub-section
h3 OnPushObserve
:markdown
This is an experimental feature. Works only in Dart.

View File

@ -1,220 +0,0 @@
p.location-badge.
exported from <a href='../change_detection'>angular2/change_detection</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/change_detection/interfaces.ts#L55-L74">angular2/src/core/change_detection/interfaces.ts (line 55)</a>
:markdown
Change detection enables data binding in Angular.
.l-main-section
h2 Members
.l-sub-section
h3 parent
:markdown
.l-sub-section
h3 mode
:markdown
.l-sub-section
h3 ref
:markdown
.l-sub-section
h3 addChild
pre.prettyprint
code.
addChild(cd: ChangeDetector)
:markdown
.l-sub-section
h3 addShadowDomChild
pre.prettyprint
code.
addShadowDomChild(cd: ChangeDetector)
:markdown
.l-sub-section
h3 removeChild
pre.prettyprint
code.
removeChild(cd: ChangeDetector)
:markdown
.l-sub-section
h3 removeShadowDomChild
pre.prettyprint
code.
removeShadowDomChild(cd: ChangeDetector)
:markdown
.l-sub-section
h3 remove
pre.prettyprint
code.
remove()
:markdown
.l-sub-section
h3 hydrate
pre.prettyprint
code.
hydrate(context: any, locals: Locals, directives: any, pipes: any)
:markdown
.l-sub-section
h3 dehydrate
pre.prettyprint
code.
dehydrate()
:markdown
.l-sub-section
h3 markPathToRootAsCheckOnce
pre.prettyprint
code.
markPathToRootAsCheckOnce()
:markdown
.l-sub-section
h3 handleEvent
pre.prettyprint
code.
handleEvent(eventName: string, elIndex: number, locals: Locals)
:markdown
.l-sub-section
h3 detectChanges
pre.prettyprint
code.
detectChanges()
:markdown
.l-sub-section
h3 checkNoChanges
pre.prettyprint
code.
checkNoChanges()
:markdown

View File

@ -1,78 +0,0 @@
p.location-badge.
exported from <a href='../change_detection'>angular2/change_detection</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/change_detection/change_detector_ref.ts#L2-L38">angular2/src/core/change_detection/change_detector_ref.ts (line 2)</a>
:markdown
Change detection enables data binding in Angular.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(_cd: ChangeDetector)
:markdown
.l-sub-section
h3 markForCheck
pre.prettyprint
code.
markForCheck()
:markdown
Request to check all OnPush ancestors.
.l-sub-section
h3 detach
pre.prettyprint
code.
detach()
:markdown
Detaches the change detector from the change detector tree.
The detached change detector will not be checked until it is reattached.
.l-sub-section
h3 reattach
pre.prettyprint
code.
reattach()
:markdown
Reattach the change detector to the change detector tree.
This also requests a check of this change detector. This reattached change detector will be
checked during the next change detection run.

View File

@ -1,23 +0,0 @@
p.location-badge.
exported from <a href='../change_detection'>angular2/change_detection</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/change_detection/exceptions.ts#L1-L17">angular2/src/core/change_detection/exceptions.ts (line 1)</a>
:markdown
Change detection enables data binding in Angular.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(exp: string, oldValue: any, currValue: any, context: any)
:markdown

View File

@ -1,40 +0,0 @@
p.location-badge.
exported from <a href='../change_detection'>angular2/change_detection</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/change_detection/differs/iterable_differs.ts#L4-L9">angular2/src/core/change_detection/differs/iterable_differs.ts (line 4)</a>
:markdown
Change detection enables data binding in Angular.
.l-main-section
h2 Members
.l-sub-section
h3 diff
pre.prettyprint
code.
diff(object: Object)
:markdown
.l-sub-section
h3 onDestroy
pre.prettyprint
code.
onDestroy()
:markdown

View File

@ -1,40 +0,0 @@
p.location-badge.
exported from <a href='../change_detection'>angular2/change_detection</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/change_detection/differs/iterable_differs.ts#L9-L17">angular2/src/core/change_detection/differs/iterable_differs.ts (line 9)</a>
:markdown
Change detection enables data binding in Angular.
.l-main-section
h2 Members
.l-sub-section
h3 supports
pre.prettyprint
code.
supports(objects: Object)
:markdown
.l-sub-section
h3 create
pre.prettyprint
code.
create(cdRef: ChangeDetectorRef)
:markdown

View File

@ -1,68 +0,0 @@
p.location-badge.
exported from <a href='../change_detection'>angular2/change_detection</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/change_detection/differs/iterable_differs.ts#L17-L80">angular2/src/core/change_detection/differs/iterable_differs.ts (line 17)</a>
:markdown
Change detection enables data binding in Angular.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Injectable
pre.prettyprint
code.
@Injectable()
.l-sub-section
h3.annotation CONST
pre.prettyprint
code.
@CONST()
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(factories: IterableDifferFactory[])
:markdown
.l-sub-section
h3 factories
:markdown
.l-sub-section
h3 find
pre.prettyprint
code.
find(iterable: Object)
:markdown

View File

@ -1,40 +0,0 @@
p.location-badge.
exported from <a href='../change_detection'>angular2/change_detection</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/change_detection/differs/keyvalue_differs.ts#L4-L9">angular2/src/core/change_detection/differs/keyvalue_differs.ts (line 4)</a>
:markdown
Change detection enables data binding in Angular.
.l-main-section
h2 Members
.l-sub-section
h3 diff
pre.prettyprint
code.
diff(object: Object)
:markdown
.l-sub-section
h3 onDestroy
pre.prettyprint
code.
onDestroy()
:markdown

View File

@ -1,40 +0,0 @@
p.location-badge.
exported from <a href='../change_detection'>angular2/change_detection</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/change_detection/differs/keyvalue_differs.ts#L9-L17">angular2/src/core/change_detection/differs/keyvalue_differs.ts (line 9)</a>
:markdown
Change detection enables data binding in Angular.
.l-main-section
h2 Members
.l-sub-section
h3 supports
pre.prettyprint
code.
supports(objects: Object)
:markdown
.l-sub-section
h3 create
pre.prettyprint
code.
create(cdRef: ChangeDetectorRef)
:markdown

View File

@ -1,68 +0,0 @@
p.location-badge.
exported from <a href='../change_detection'>angular2/change_detection</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/change_detection/differs/keyvalue_differs.ts#L17-L80">angular2/src/core/change_detection/differs/keyvalue_differs.ts (line 17)</a>
:markdown
Change detection enables data binding in Angular.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Injectable
pre.prettyprint
code.
@Injectable()
.l-sub-section
h3.annotation CONST
pre.prettyprint
code.
@CONST()
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(factories: KeyValueDifferFactory[])
:markdown
.l-sub-section
h3 factories
:markdown
.l-sub-section
h3 find
pre.prettyprint
code.
find(kv: Object)
:markdown

View File

@ -1,111 +0,0 @@
p.location-badge.
exported from <a href='../change_detection'>angular2/change_detection</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/change_detection/parser/locals.ts#L2-L44">angular2/src/core/change_detection/parser/locals.ts (line 2)</a>
:markdown
Change detection enables data binding in Angular.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(parent: Locals, current: Map&lt;any, any&gt;)
:markdown
.l-sub-section
h3 parent
:markdown
.l-sub-section
h3 current
:markdown
.l-sub-section
h3 contains
pre.prettyprint
code.
contains(name: string)
:markdown
.l-sub-section
h3 get
pre.prettyprint
code.
get(name: string)
:markdown
.l-sub-section
h3 set
pre.prettyprint
code.
set(name: string, value: any)
:markdown
.l-sub-section
h3 clearValues
pre.prettyprint
code.
clearValues()
:markdown

View File

@ -1,24 +0,0 @@
p.location-badge.
exported from <a href='../change_detection'>angular2/change_detection</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/change_detection/pipe_transform.ts#L16-L39">angular2/src/core/change_detection/pipe_transform.ts (line 16)</a>
:markdown
Change detection enables data binding in Angular.
.l-main-section
h2 Members
.l-sub-section
h3 onDestroy
pre.prettyprint
code.
onDestroy()
:markdown

View File

@ -1,24 +0,0 @@
p.location-badge.
exported from <a href='../change_detection'>angular2/change_detection</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/change_detection/pipe_transform.ts#L1-L16">angular2/src/core/change_detection/pipe_transform.ts (line 1)</a>
:markdown
Change detection enables data binding in Angular.
.l-main-section
h2 Members
.l-sub-section
h3 transform
pre.prettyprint
code.
transform(value: any, args: any[])
:markdown

View File

@ -1,35 +0,0 @@
p.location-badge.
exported from <a href='../change_detection'>angular2/change_detection</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/change_detection/change_detection_util.ts#L14-L43">angular2/src/core/change_detection/change_detection_util.ts (line 14)</a>
:markdown
Change detection enables data binding in Angular.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(wrapped: any)
:markdown
.l-sub-section
h3 wrapped
:markdown

View File

@ -1,66 +0,0 @@
{
"index" : {
"title" : "Change Detection",
"intro" : "Change detection enables data binding in Angular."
},
"ChangeDetectionStrategy-enum" : {
"title" : "ChangeDetectionStrategy"
},
"ExpressionChangedAfterItHasBeenCheckedException-class" : {
"title" : "ExpressionChangedAfterItHasBeenCheckedException"
},
"ChangeDetectionError-class" : {
"title" : "ChangeDetectionError"
},
"ChangeDetector-interface" : {
"title" : "ChangeDetector"
},
"Locals-class" : {
"title" : "Locals"
},
"ChangeDetectorRef-class" : {
"title" : "ChangeDetectorRef"
},
"WrappedValue-class" : {
"title" : "WrappedValue"
},
"PipeTransform-interface" : {
"title" : "PipeTransform"
},
"PipeOnDestroy-interface" : {
"title" : "PipeOnDestroy"
},
"IterableDiffers-class" : {
"title" : "IterableDiffers"
},
"IterableDiffer-interface" : {
"title" : "IterableDiffer"
},
"IterableDifferFactory-interface" : {
"title" : "IterableDifferFactory"
},
"KeyValueDiffers-class" : {
"title" : "KeyValueDiffers"
},
"KeyValueDiffer-interface" : {
"title" : "KeyValueDiffer"
},
"KeyValueDifferFactory-interface" : {
"title" : "KeyValueDifferFactory"
}
}

View File

@ -1,11 +0,0 @@
p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/change_detection.ts#L1-L28">angular2/change_detection.ts (line 1)</a>
ul
for page, slug in public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]._data
if slug != 'index'
- var url = "/docs/" + current.path[1] + "/" + current.path[2] + "/" + current.path[3] + "/" + current.path[4] + "/" + slug + ".html"
li.c8
!= partial("../../../../../_includes/_hover-card", {name: page.title, url: url })

View File

@ -1,24 +0,0 @@
.l-main-section
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/application_tokens.ts#L25-L25">angular2/src/core/application_tokens.ts (line 25)</a>
:markdown
An opaque token representing the application root type in the <a href='../di/Injector-class.html'><code>Injector</code></a>.
```
@Component(...)
@View(...)
class MyApp {
...
}
bootstrap(MyApp).then((appRef:ApplicationRef) {
expect(appRef.injector.get(appComponentTypeToken)).toEqual(MyApp);
});
```

View File

@ -1,47 +0,0 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/services/app_root_url.ts#L2-L25">angular2/src/core/services/app_root_url.ts (line 2)</a>
:markdown
Define angular core API here.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Injectable
pre.prettyprint
code.
@Injectable()
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(value: string)
:markdown
.l-sub-section
h3 value
:markdown
Returns the base URL of the currently running application.

View File

@ -1,279 +0,0 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/compiler/view_manager.ts#L18-L378">angular2/src/core/compiler/view_manager.ts (line 18)</a>
:markdown
Define angular core API here.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Injectable
pre.prettyprint
code.
@Injectable()
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(_viewPool: AppViewPool, _viewListener: AppViewListener, _utils: AppViewManagerUtils, _renderer: Renderer)
:markdown
.l-sub-section
h3 getViewContainer
pre.prettyprint
code.
getViewContainer(location: ElementRef)
:markdown
Returns a <a href='ViewContainerRef-class.html'><code>ViewContainerRef</code></a> at the <a href='ElementRef-class.html'><code>ElementRef</code></a> location.
.l-sub-section
h3 getHostElement
pre.prettyprint
code.
getHostElement(hostViewRef: HostViewRef)
:markdown
Return the first child element of the host element view.
.l-sub-section
h3 getNamedElementInComponentView
pre.prettyprint
code.
getNamedElementInComponentView(hostLocation: ElementRef, variableName: string)
:markdown
Returns an ElementRef for the element with the given variable name
in the current view.
- `hostLocation`: <a href='ElementRef-class.html'><code>ElementRef</code></a> of any element in the View which defines the scope of
search.
- `variableName`: Name of the variable to locate.
- Returns <a href='ElementRef-class.html'><code>ElementRef</code></a> of the found element or null. (Throws if not found.)
.l-sub-section
h3 getComponent
pre.prettyprint
code.
getComponent(hostLocation: ElementRef)
:markdown
Returns the component instance for a given element.
The component is the execution context as seen by an expression at that <a href='ElementRef-class.html'><code>ElementRef</code></a>
location.
.l-sub-section
h3 createRootHostView
pre.prettyprint
code.
createRootHostView(hostProtoViewRef: ProtoViewRef, overrideSelector: string, injector: Injector)
:markdown
Load component view into existing element.
Use this if a host element is already in the DOM and it is necessary to upgrade
the element into Angular component by attaching a view but reusing the existing element.
- `hostProtoViewRef`: <a href='ProtoViewRef-class.html'><code>ProtoViewRef</code></a> Proto view to use in creating a view for this
component.
- `overrideSelector`: (optional) selector to use in locating the existing element to load
the view into. If not specified use the selector in the component definition of the
`hostProtoView`.
- injector: <a href='../di/Injector-class.html'><code>Injector</code></a> to use as parent injector for the view.
See <a href='AppViewManager-class.html#destroyRootHostView'><code>AppViewManager</code></a>.
```
@ng.Component({
selector: 'child-component'
})
@ng.View({
template: 'Child'
})
class ChildComponent {
}
@ng.Component({
selector: 'my-app'
})
@ng.View({
template: `
Parent (<some-component></some-component>)
`
})
class MyApp {
viewRef: ng.ViewRef;
constructor(public appViewManager: ng.AppViewManager, compiler: ng.Compiler) {
compiler.compileInHost(ChildComponent).then((protoView: ng.ProtoViewRef) => {
this.viewRef = appViewManager.createRootHostView(protoView, 'some-component', null);
})
}
onDestroy() {
this.appViewManager.destroyRootHostView(this.viewRef);
this.viewRef = null;
}
}
ng.bootstrap(MyApp);
```
.l-sub-section
h3 destroyRootHostView
pre.prettyprint
code.
destroyRootHostView(hostViewRef: HostViewRef)
:markdown
Remove the View created with <a href='AppViewManager-class.html#createRootHostView'><code>AppViewManager</code></a>.
.l-sub-section
h3 createEmbeddedViewInContainer
pre.prettyprint
code.
createEmbeddedViewInContainer(viewContainerLocation: ElementRef, atIndex: number, templateRef: TemplateRef)
:markdown
See <a href='AppViewManager-class.html#destroyViewInContainer'><code>AppViewManager</code></a>.
.l-sub-section
h3 createHostViewInContainer
pre.prettyprint
code.
createHostViewInContainer(viewContainerLocation: ElementRef, atIndex: number, protoViewRef: ProtoViewRef, imperativelyCreatedInjector: ResolvedBinding[])
:markdown
See <a href='AppViewManager-class.html#destroyViewInContainer'><code>AppViewManager</code></a>.
.l-sub-section
h3 destroyViewInContainer
pre.prettyprint
code.
destroyViewInContainer(viewContainerLocation: ElementRef, atIndex: number)
:markdown
See <a href='AppViewManager-class.html#createViewInContainer'><code>AppViewManager</code></a>.
.l-sub-section
h3 attachViewInContainer
pre.prettyprint
code.
attachViewInContainer(viewContainerLocation: ElementRef, atIndex: number, viewRef: ViewRef)
:markdown
See <a href='AppViewManager-class.html#detachViewInContainer'><code>AppViewManager</code></a>.
.l-sub-section
h3 detachViewInContainer
pre.prettyprint
code.
detachViewInContainer(viewContainerLocation: ElementRef, atIndex: number)
:markdown
See <a href='AppViewManager-class.html#attachViewInContainer'><code>AppViewManager</code></a>.

View File

@ -1,78 +0,0 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/application_ref.ts#L3-L47">angular2/src/core/application_ref.ts (line 3)</a>
:markdown
Define angular core API here.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(hostComponent: ComponentRef, hostComponentType: Type, injector: Injector)
:markdown
.l-sub-section
h3 hostComponentType
:markdown
Returns the current <a href='../metadata/ComponentMetadata-class.html'><code>ComponentMetadata</code></a> type.
.l-sub-section
h3 hostComponent
:markdown
Returns the current <a href='../metadata/ComponentMetadata-class.html'><code>ComponentMetadata</code></a> instance.
.l-sub-section
h3 dispose
pre.prettyprint
code.
dispose()
:markdown
Dispose (un-load) the application.
.l-sub-section
h3 injector
:markdown
Returns the root application <a href='../di/Injector-class.html'><code>Injector</code></a>.

View File

@ -1,48 +0,0 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/compiler/compiler.ts#L71-L361">angular2/src/core/compiler/compiler.ts (line 71)</a>
:markdown
Define angular core API here.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Injectable
pre.prettyprint
code.
@Injectable()
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(_directiveResolver: DirectiveResolver, _pipeResolver: PipeResolver, _defaultPipes: Type[], _compilerCache: CompilerCache, _viewResolver: ViewResolver, _componentUrlMapper: ComponentUrlMapper, _urlResolver: UrlResolver, _render: RenderCompiler, _protoViewFactory: ProtoViewFactory, appUrl: AppRootUrl)
:markdown
.l-sub-section
h3 compileInHost
pre.prettyprint
code.
compileInHost(componentTypeOrBinding: Type | Binding)
:markdown

View File

@ -1,78 +0,0 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/compiler/dynamic_component_loader.ts#L7-L42">angular2/src/core/compiler/dynamic_component_loader.ts (line 7)</a>
:markdown
Define angular core API here.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(location: ElementRef, instance: any, _dispose: () =&gt; void)
:markdown
.l-sub-section
h3 location
:markdown
Location of the component host element.
.l-sub-section
h3 instance
:markdown
Instance of component.
.l-sub-section
h3 hostView
:markdown
Returns the host <a href='ViewRef-class.html'><code>ViewRef</code></a>.
.l-sub-section
h3 dispose
pre.prettyprint
code.
dispose()
:markdown
Dispose of the component instance.

View File

@ -1,38 +0,0 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/compiler/component_url_mapper.ts#L3-L21">angular2/src/core/compiler/component_url_mapper.ts (line 3)</a>
:markdown
Define angular core API here.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Injectable
pre.prettyprint
code.
@Injectable()
.l-main-section
h2 Members
.l-sub-section
h3 getUrl
pre.prettyprint
code.
getUrl(component: Type)
:markdown
Returns the base URL to the component source file.
The returned URL could be:
- an absolute URL,
- a path relative to the application

View File

@ -1,35 +0,0 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/compiler/directive_resolver.ts#L4-L30">angular2/src/core/compiler/directive_resolver.ts (line 4)</a>
:markdown
Define angular core API here.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Injectable
pre.prettyprint
code.
@Injectable()
.l-main-section
h2 Members
.l-sub-section
h3 resolve
pre.prettyprint
code.
resolve(type: Type)
:markdown
Return <a href='../metadata/DirectiveMetadata-class.html'><code>DirectiveMetadata</code></a> for a given `Type`.

View File

@ -1,218 +0,0 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/compiler/dynamic_component_loader.ts#L42-L235">angular2/src/core/compiler/dynamic_component_loader.ts (line 42)</a>
:markdown
Define angular core API here.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Injectable
pre.prettyprint
code.
@Injectable()
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(_compiler: Compiler, _viewManager: AppViewManager)
:markdown
.l-sub-section
h3 loadAsRoot
pre.prettyprint
code.
loadAsRoot(typeOrBinding: Type | Binding, overrideSelector: string, injector: Injector)
:markdown
Loads a root component that is placed at the first element that matches the component's
selector.
- `typeOrBinding` `Type` \ <a href='../di/Binding-class.html'><code>Binding</code></a> - representing the component to load.
- `overrideSelector` (optional) selector to load the component at (or use
`@Component.selector`) The selector can be anywhere (i.e. outside the current component.)
- `injector` <a href='../di/Injector-class.html'><code>Injector</code></a> - optional injector to use for the component.
The loaded component receives injection normally as a hosted view.
```
@ng.Component({
selector: 'child-component'
})
@ng.View({
template: 'Child'
})
class ChildComponent {
}
@ng.Component({
selector: 'my-app'
})
@ng.View({
template: `
Parent (<child id="child"></child>)
`
})
class MyApp {
constructor(dynamicComponentLoader: ng.DynamicComponentLoader, injector: ng.Injector) {
dynamicComponentLoader.loadAsRoot(ChildComponent, '#child', injector);
}
}
ng.bootstrap(MyApp);
```
Resulting DOM:
```
<my-app>
Parent (
<child id="child">
Child
</child>
)
</my-app>
```
.l-sub-section
h3 loadIntoLocation
pre.prettyprint
code.
loadIntoLocation(typeOrBinding: Type | Binding, hostLocation: ElementRef, anchorName: string, bindings?: ResolvedBinding[])
:markdown
Loads a component into the component view of the provided ElementRef next to the element
with the given name.
The loaded component receives injection normally as a hosted view.
```
@ng.Component({
selector: 'child-component'
})
@ng.View({
template: 'Child'
})
class ChildComponent {
}
@ng.Component({
selector: 'my-app'
})
@ng.View({
template: `
Parent (<div #child></div>)
`
})
class MyApp {
constructor(dynamicComponentLoader: ng.DynamicComponentLoader, elementRef: ng.ElementRef) {
dynamicComponentLoader.loadIntoLocation(ChildComponent, elementRef, 'child');
}
}
ng.bootstrap(MyApp);
```
Resulting DOM:
```
<my-app>
Parent (
<div #child="" class="ng-binding"></div>
<child-component class="ng-binding">Child</child-component>
)
</my-app>
```
.l-sub-section
h3 loadNextToLocation
pre.prettyprint
code.
loadNextToLocation(typeOrBinding: Type | Binding, location: ElementRef, bindings?: ResolvedBinding[])
:markdown
Loads a component next to the provided ElementRef.
The loaded component receives injection normally as a hosted view.
```
@ng.Component({
selector: 'child-component'
})
@ng.View({
template: 'Child'
})
class ChildComponent {
}
@ng.Component({
selector: 'my-app'
})
@ng.View({
template: `Parent`
})
class MyApp {
constructor(dynamicComponentLoader: ng.DynamicComponentLoader, elementRef: ng.ElementRef) {
dynamicComponentLoader.loadIntoLocation(ChildComponent, elementRef, 'child');
}
}
ng.bootstrap(MyApp);
```
Resulting DOM:
```
<my-app>Parent</my-app>
<child-component>Child</child-component>
```

View File

@ -1,101 +0,0 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/compiler/element_ref.ts#L3-L63">angular2/src/core/compiler/element_ref.ts (line 3)</a>
:markdown
Define angular core API here.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(parentView: ViewRef, boundElementIndex: number, renderBoundElementIndex: number, _renderer: Renderer)
:markdown
.l-sub-section
h3 parentView
:markdown
Reference to the <a href='ViewRef-class.html'><code>ViewRef</code></a> where the `ElementRef` is inside of.
.l-sub-section
h3 boundElementIndex
:markdown
Index of the element inside the <a href='ViewRef-class.html'><code>ViewRef</code></a>.
This is used internally by the Angular framework to locate elements.
.l-sub-section
h3 renderBoundElementIndex
:markdown
Index of the element inside the `RenderViewRef`.
This is used internally by the Angular framework to locate elements.
.l-sub-section
h3 renderView
:markdown
.l-sub-section
h3 nativeElement
:markdown
Returns the native Element implementation.
In the browser this represents the DOM Element.
The `nativeElement` can be used as an escape hatch when direct DOM manipulation is needed. Use
this with caution, as it creates tight coupling between your application and the Browser, which
will not work in WebWorkers.
NOTE: This method will return null in the webworker scenario!

View File

@ -1,103 +0,0 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/facade/async.ts#L91-L123">angular2/src/core/facade/async.ts (line 91)</a>
:markdown
Define angular core API here.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor()
:markdown
.l-sub-section
h3 observer
pre.prettyprint
code.
observer(generator: any)
:markdown
.l-sub-section
h3 toRx
pre.prettyprint
code.
toRx()
:markdown
.l-sub-section
h3 next
pre.prettyprint
code.
next(value: any)
:markdown
.l-sub-section
h3 throw
pre.prettyprint
code.
throw(error: any)
:markdown
.l-sub-section
h3 return
pre.prettyprint
code.
return(value?: any)
:markdown

View File

@ -1,7 +0,0 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/compiler/view_ref.ts#L13-L15">angular2/src/core/compiler/view_ref.ts (line 13)</a>
:markdown
Define angular core API here.

View File

@ -1,61 +0,0 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/life_cycle/life_cycle.ts#L5-L89">angular2/src/core/life_cycle/life_cycle.ts (line 5)</a>
:markdown
Define angular core API here.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Injectable
pre.prettyprint
code.
@Injectable()
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(changeDetector?: ChangeDetector, enforceNoNewChanges?: boolean)
:markdown
.l-sub-section
h3 tick
pre.prettyprint
code.
tick()
:markdown
Invoke this method to explicitly process change detection and its side-effects.
In development mode, `tick()` also performs a second change detection cycle to ensure that no
further
changes are detected. If additional changes are picked up during this second cycle, bindings
in
the app have
side-effects that cannot be resolved in a single change detection pass. In this case, Angular
throws an error,
since an Angular application can only have one change detection pass during which all change
detection must
complete.

View File

@ -1,162 +0,0 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/zone/ng_zone.ts#L6-L279">angular2/src/core/zone/ng_zone.ts (line 6)</a>
:markdown
Define angular core API here.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor({enableLongStackTrace}: any)
:markdown
Associates with this
- a "root" zone, which the one that instantiated this.
- an "inner" zone, which is a child of the root zone.
.l-sub-section
h3 overrideOnTurnStart
pre.prettyprint
code.
overrideOnTurnStart(onTurnStartFn: Function)
:markdown
Sets the zone hook that is called just before Angular event turn starts.
It is called once per browser event.
.l-sub-section
h3 overrideOnTurnDone
pre.prettyprint
code.
overrideOnTurnDone(onTurnDoneFn: Function)
:markdown
Sets the zone hook that is called immediately after Angular processes
all pending microtasks.
.l-sub-section
h3 overrideOnEventDone
pre.prettyprint
code.
overrideOnEventDone(onEventDoneFn: Function, opt_waitForAsync: boolean)
:markdown
Sets the zone hook that is called immediately after the last turn in
an event completes. At this point Angular will no longer attempt to
sync the UI. Any changes to the data model will not be reflected in the
DOM. `onEventDoneFn` is executed outside Angular zone.
This hook is useful for validating application state (e.g. in a test).
.l-sub-section
h3 overrideOnErrorHandler
pre.prettyprint
code.
overrideOnErrorHandler(errorHandlingFn: Function)
:markdown
Sets the zone hook that is called when an error is uncaught in the
Angular zone. The first argument is the error. The second argument is
the stack trace.
.l-sub-section
h3 run
pre.prettyprint
code.
run(fn: () =&gt; any)
: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: NgZone = [ref to the application zone];
zone.run(() => {
// the change detection will run after this function and the microtasks it enqueues have
executed.
});
```
.l-sub-section
h3 runOutsideAngular
pre.prettyprint
code.
runOutsideAngular(fn: () =&gt; any)
: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: NgZone = [ref to the application zone];
zone.runOutsideAngular(() => {
element.onClick(() => {
// Clicking on the element would not trigger the change detection
});
});
```

View File

@ -1,24 +0,0 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/facade/async.ts#L86-L91">angular2/src/core/facade/async.ts (line 86)</a>
:markdown
Define angular core API here.
.l-main-section
h2 Members
.l-sub-section
h3 observer
pre.prettyprint
code.
observer(generator: any)
:markdown

View File

@ -1,22 +0,0 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/compiler/view_ref.ts#L91-L135">angular2/src/core/compiler/view_ref.ts (line 91)</a>
:markdown
Define angular core API here.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(_protoView:AppProtoView)
:markdown

View File

@ -1,156 +0,0 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/compiler/query_list.ts#L1-L109">angular2/src/core/compiler/query_list.ts (line 1)</a>
:markdown
Define angular core API here.
.l-main-section
h2 Members
.l-sub-section
h3 reset
pre.prettyprint
code.
reset(newList: T[])
:markdown
.l-sub-section
h3 add
pre.prettyprint
code.
add(obj: T)
:markdown
.l-sub-section
h3 fireCallbacks
pre.prettyprint
code.
fireCallbacks()
:markdown
.l-sub-section
h3 onChange
pre.prettyprint
code.
onChange(callback: () =&gt; void)
:markdown
.l-sub-section
h3 removeCallback
pre.prettyprint
code.
removeCallback(callback: () =&gt; void)
:markdown
.l-sub-section
h3 toString
pre.prettyprint
code.
toString()
:markdown
.l-sub-section
h3 length
:markdown
.l-sub-section
h3 first
:markdown
.l-sub-section
h3 last
:markdown
.l-sub-section
h3 map
pre.prettyprint
code.
map(fn: (item: T) =&gt; U)
:markdown

View File

@ -1,65 +0,0 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/compiler/template_ref.ts#L3-L32">angular2/src/core/compiler/template_ref.ts (line 3)</a>
:markdown
Define angular core API here.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(elementRef: ElementRef)
:markdown
.l-sub-section
h3 elementRef
:markdown
The location of the template
.l-sub-section
h3 protoViewRef
:markdown
.l-sub-section
h3 hasLocal
pre.prettyprint
code.
hasLocal(name: string)
:markdown
Whether this template has a local variable with the given name

View File

@ -1,7 +0,0 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/facade/lang.ts#L23-L23">angular2/src/core/facade/lang.ts (line 23)</a>
:markdown
Define angular core API here.

View File

@ -1,39 +0,0 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/services/url_resolver.ts#L9-L33">angular2/src/core/services/url_resolver.ts (line 9)</a>
:markdown
Define angular core API here.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Injectable
pre.prettyprint
code.
@Injectable()
.l-main-section
h2 Members
.l-sub-section
h3 resolve
pre.prettyprint
code.
resolve(baseUrl: string, url: string)
:markdown
Resolves the `url` given the `baseUrl`:
- when the `url` is null, the `baseUrl` is returned,
- if `url` is relative ('path/to/here', './path/to/here'), the resolved url is a combination of
`baseUrl` and `url`,
- if `url` is absolute (it has a scheme: 'http://', 'https://' or start with '/'), the `url` is
returned as is (ignoring the `baseUrl`)

View File

@ -1,213 +0,0 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/compiler/view_container_ref.ts#L10-L116">angular2/src/core/compiler/view_container_ref.ts (line 10)</a>
:markdown
Define angular core API here.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(viewManager:AppViewManager, element: ElementRef)
:markdown
.l-sub-section
h3 viewManager
:markdown
.l-sub-section
h3 element
:markdown
.l-sub-section
h3 clear
pre.prettyprint
code.
clear()
:markdown
Remove all <a href='ViewRef-class.html'><code>ViewRef</code></a>s at current location.
.l-sub-section
h3 get
pre.prettyprint
code.
get(index: number)
:markdown
Return a <a href='ViewRef-class.html'><code>ViewRef</code></a> at specific index.
.l-sub-section
h3 length
:markdown
Returns number of <a href='ViewRef-class.html'><code>ViewRef</code></a>s currently attached at this location.
.l-sub-section
h3 createEmbeddedView
pre.prettyprint
code.
createEmbeddedView(templateRef: TemplateRef, atIndex?: number)
:markdown
Create and insert a <a href='ViewRef-class.html'><code>ViewRef</code></a> into the view-container.
- `protoViewRef` (optional) <a href='ProtoViewRef-class.html'><code>ProtoViewRef</code></a> - The `ProtoView` to use for creating
`View` to be inserted at this location. If `ViewContainer` is created at a location
of inline template, then `protoViewRef` is the `ProtoView` of the template.
- `atIndex` (optional) `number` - location of insertion point. (Or at the end if unspecified.)
- `context` (optional) <a href='ElementRef-class.html'><code>ElementRef</code></a> - Context (for expression evaluation) from the
<a href='ElementRef-class.html'><code>ElementRef</code></a> location. (Or current context if unspecified.)
- `bindings` (optional) Array of <a href='../di/ResolvedBinding-class.html'><code>ResolvedBinding</code></a> - Used for configuring
`ElementInjector`.
Returns newly created <a href='ViewRef-class.html'><code>ViewRef</code></a>.
.l-sub-section
h3 createHostView
pre.prettyprint
code.
createHostView(protoViewRef?: ProtoViewRef, atIndex?: number, dynamicallyCreatedBindings?: ResolvedBinding[])
:markdown
.l-sub-section
h3 insert
pre.prettyprint
code.
insert(viewRef: ViewRef, atIndex?: number)
:markdown
Insert a <a href='ViewRef-class.html'><code>ViewRef</code></a> at specefic index.
The index is location at which the <a href='ViewRef-class.html'><code>ViewRef</code></a> should be attached. If omitted it is
inserted at the end.
Returns the inserted <a href='ViewRef-class.html'><code>ViewRef</code></a>.
.l-sub-section
h3 indexOf
pre.prettyprint
code.
indexOf(viewRef: ViewRef)
:markdown
Return the index of already inserted <a href='ViewRef-class.html'><code>ViewRef</code></a>.
.l-sub-section
h3 remove
pre.prettyprint
code.
remove(atIndex?: number)
:markdown
Remove a <a href='ViewRef-class.html'><code>ViewRef</code></a> at specific index.
If the index is omitted last <a href='ViewRef-class.html'><code>ViewRef</code></a> is removed.
.l-sub-section
h3 detach
pre.prettyprint
code.
detach(atIndex?: number)
:markdown
The method can be used together with insert to implement a view move, i.e.
moving the dom nodes while the directives in the view stay intact.

View File

@ -1,68 +0,0 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/compiler/view_ref.ts#L15-L91">angular2/src/core/compiler/view_ref.ts (line 15)</a>
:markdown
Define angular core API here.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(_view:AppView)
:markdown
.l-sub-section
h3 render
:markdown
Return `RenderViewRef`
.l-sub-section
h3 renderFragment
:markdown
Return `RenderFragmentRef`
.l-sub-section
h3 setLocal
pre.prettyprint
code.
setLocal(contextName: string, value: any)
:markdown
Set local variable in a view.
- `contextName` - Name of the local variable in a view.
- `value` - Value for the local variable in a view.

View File

@ -1,95 +0,0 @@
{
"index" : {
"title" : "Core",
"intro" : "Define angular core API here."
},
"APP_COMPONENT-const" : {
"title" : "APP_COMPONENT",
"varType" : "OpaqueToken"
},
"Type-interface" : {
"title" : "Type"
},
"ApplicationRef-class" : {
"title" : "ApplicationRef"
},
"AppRootUrl-class" : {
"title" : "AppRootUrl"
},
"UrlResolver-class" : {
"title" : "UrlResolver"
},
"ComponentUrlMapper-class" : {
"title" : "ComponentUrlMapper"
},
"DirectiveResolver-class" : {
"title" : "DirectiveResolver"
},
"Compiler-class" : {
"title" : "Compiler"
},
"AppViewManager-class" : {
"title" : "AppViewManager"
},
"QueryList-class" : {
"title" : "QueryList"
},
"DynamicComponentLoader-class" : {
"title" : "DynamicComponentLoader"
},
"LifeCycle-class" : {
"title" : "LifeCycle"
},
"ElementRef-class" : {
"title" : "ElementRef"
},
"TemplateRef-class" : {
"title" : "TemplateRef"
},
"ViewRef-class" : {
"title" : "ViewRef"
},
"HostViewRef-interface" : {
"title" : "HostViewRef"
},
"ProtoViewRef-class" : {
"title" : "ProtoViewRef"
},
"ViewContainerRef-class" : {
"title" : "ViewContainerRef"
},
"ComponentRef-class" : {
"title" : "ComponentRef"
},
"NgZone-class" : {
"title" : "NgZone"
},
"Observable-class" : {
"title" : "Observable"
},
"EventEmitter-class" : {
"title" : "EventEmitter"
}
}

View File

@ -1,11 +0,0 @@
p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/core.ts#L1-L31">angular2/core.ts (line 1)</a>
ul
for page, slug in public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]._data
if slug != 'index'
- var url = "/docs/" + current.path[1] + "/" + current.path[2] + "/" + current.path[3] + "/" + current.path[4] + "/" + slug + ".html"
li.c8
!= partial("../../../../../_includes/_hover-card", {name: page.title, url: url })

View File

@ -1,127 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/exceptions.ts#L27-L58">angular2/src/core/di/exceptions.ts (line 27)</a>
:markdown
The `di` module provides dependency injection container services.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(injector: Injector, key: Key, constructResolvingMessage: Function, originalException?: any, originalStack?: any)
:markdown
.l-sub-section
h3 name
:markdown
.l-sub-section
h3 message
:markdown
.l-sub-section
h3 keys
:markdown
.l-sub-section
h3 injectors
:markdown
.l-sub-section
h3 constructResolvingMessage
:markdown
.l-sub-section
h3 addKey
pre.prettyprint
code.
addKey(injector: Injector, key: Key)
:markdown
.l-sub-section
h3 context
:markdown
.l-sub-section
h3 toString
pre.prettyprint
code.
toString()
:markdown

View File

@ -1,226 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/binding.ts#L36-L217">angular2/src/core/di/binding.ts (line 36)</a>
:markdown
The `di` module provides dependency injection container services.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation CONST
pre.prettyprint
code.
@CONST()
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(token: any, {toClass, toValue, toAlias, toFactory, deps}:
{toClass?: Type, toValue?: any, toAlias?: any, toFactory?: Function, deps?: any[]})
:markdown
.l-sub-section
h3 token
:markdown
Token used when retrieving this binding. Usually the `Type`.
.l-sub-section
h3 toClass
:markdown
Binds an interface to an implementation / subclass.
Becuse `toAlias` and `toClass` are often confused, the example contains both use cases for easy
comparison.
```javascript
class Vehicle {}
class Car extends Vehicle {}
var injectorClass = Injector.resolveAndCreate([
Car,
new Binding(Vehicle, { toClass: Car })
]);
var injectorAlias = Injector.resolveAndCreate([
Car,
new Binding(Vehicle, { toAlias: Car })
]);
expect(injectorClass.get(Vehicle)).not.toBe(injectorClass.get(Car));
expect(injectorClass.get(Vehicle) instanceof Car).toBe(true);
expect(injectorAlias.get(Vehicle)).toBe(injectorAlias.get(Car));
expect(injectorAlias.get(Vehicle) instanceof Car).toBe(true);
```
.l-sub-section
h3 toValue
:markdown
Binds a key to a value.
```javascript
var injector = Injector.resolveAndCreate([
new Binding(String, { toValue: 'Hello' })
]);
expect(injector.get(String)).toEqual('Hello');
```
.l-sub-section
h3 toAlias
:markdown
Binds a key to the alias for an existing key.
An alias means that <a href='Injector-class.html'><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.
Becuse `toAlias` and `toClass` are often confused the example contains both use cases for easy
comparison.
```javascript
class Vehicle {}
class Car extends Vehicle {}
var injectorAlias = Injector.resolveAndCreate([
Car,
new Binding(Vehicle, { toAlias: Car })
]);
var injectorClass = Injector.resolveAndCreate([
Car,
new Binding(Vehicle, { toClass: Car })
]);
expect(injectorAlias.get(Vehicle)).toBe(injectorAlias.get(Car));
expect(injectorAlias.get(Vehicle) instanceof Car).toBe(true);
expect(injectorClass.get(Vehicle)).not.toBe(injectorClass.get(Car));
expect(injectorClass.get(Vehicle) instanceof Car).toBe(true);
```
.l-sub-section
h3 toFactory
:markdown
Binds a key to a function which computes the value.
```javascript
var injector = Injector.resolveAndCreate([
new Binding(Number, { toFactory: () => { return 1+2; }}),
new Binding(String, { toFactory: (value) => { return "Value: " + value; },
dependencies: [Number] })
]);
expect(injector.get(Number)).toEqual(3);
expect(injector.get(String)).toEqual('Value: 3');
```
.l-sub-section
h3 dependencies
:markdown
Used in conjunction with `toFactory` and specifies a set of dependencies
(as `token`s) which should be injected into the factory function.
```javascript
var injector = Injector.resolveAndCreate([
new Binding(Number, { toFactory: () => { return 1+2; }}),
new Binding(String, { toFactory: (value) => { return "Value: " + value; },
dependencies: [Number] })
]);
expect(injector.get(Number)).toEqual(3);
expect(injector.get(String)).toEqual('Value: 3');
```
.l-sub-section
h3 resolve
pre.prettyprint
code.
resolve()
:markdown
Converts the <a href='Binding-class.html'><code>Binding</code></a> into <a href='ResolvedBinding-class.html'><code>ResolvedBinding</code></a>.
<a href='Injector-class.html'><code>Injector</code></a> internally only uses <a href='ResolvedBinding-class.html'><code>ResolvedBinding</code></a>, <a href='Binding-class.html'><code>Binding</code></a> contains
convenience binding syntax.

View File

@ -1,182 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/binding.ts#L258-L371">angular2/src/core/di/binding.ts (line 258)</a>
:markdown
The `di` module provides dependency injection container services.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(token: any)
:markdown
.l-sub-section
h3 token
:markdown
.l-sub-section
h3 toClass
pre.prettyprint
code.
toClass(type: Type)
:markdown
Binds an interface to an implementation / subclass.
Because `toAlias` and `toClass` are often confused, the example contains both use cases for
easy comparison.
```javascript
class Vehicle {}
class Car extends Vehicle {}
var injectorClass = Injector.resolveAndCreate([
Car,
bind(Vehicle).toClass(Car)
]);
var injectorAlias = Injector.resolveAndCreate([
Car,
bind(Vehicle).toAlias(Car)
]);
expect(injectorClass.get(Vehicle)).not.toBe(injectorClass.get(Car));
expect(injectorClass.get(Vehicle) instanceof Car).toBe(true);
expect(injectorAlias.get(Vehicle)).toBe(injectorAlias.get(Car));
expect(injectorAlias.get(Vehicle) instanceof Car).toBe(true);
```
.l-sub-section
h3 toValue
pre.prettyprint
code.
toValue(value: any)
:markdown
Binds a key to a value.
```javascript
var injector = Injector.resolveAndCreate([
bind(String).toValue('Hello')
]);
expect(injector.get(String)).toEqual('Hello');
```
.l-sub-section
h3 toAlias
pre.prettyprint
code.
toAlias(aliasToken: /*Type*/ any)
:markdown
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 separate instance of `toClass` will be returned.)
Becuse `toAlias` and `toClass` are often confused, the example contains both use cases for easy
comparison.
```javascript
class Vehicle {}
class Car extends Vehicle {}
var injectorAlias = Injector.resolveAndCreate([
Car,
bind(Vehicle).toAlias(Car)
]);
var injectorClass = Injector.resolveAndCreate([
Car,
bind(Vehicle).toClass(Car)
]);
expect(injectorAlias.get(Vehicle)).toBe(injectorAlias.get(Car));
expect(injectorAlias.get(Vehicle) instanceof Car).toBe(true);
expect(injectorClass.get(Vehicle)).not.toBe(injectorClass.get(Car));
expect(injectorClass.get(Vehicle) instanceof Car).toBe(true);
```
.l-sub-section
h3 toFactory
pre.prettyprint
code.
toFactory(factoryFunction: Function, dependencies?: any[])
:markdown
Binds a key to a function which computes the value.
```javascript
var injector = Injector.resolveAndCreate([
bind(Number).toFactory(() => { return 1+2; }),
bind(String).toFactory((v) => { return "Value: " + v; }, [Number])
]);
expect(injector.get(Number)).toEqual(3);
expect(injector.get(String)).toEqual('Value: 3');
```

View File

@ -1,63 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/injector.ts#L360-L366">angular2/src/core/di/injector.ts (line 360)</a>
:markdown
The `di` module provides dependency injection container services.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(binding: ResolvedBinding, visibility: Visibility)
:markdown
.l-sub-section
h3 binding
:markdown
.l-sub-section
h3 visibility
:markdown
.l-sub-section
h3 getKeyId
pre.prettyprint
code.
getKeyId()
:markdown

View File

@ -1,23 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/exceptions.ts#L71-L95">angular2/src/core/di/exceptions.ts (line 71)</a>
:markdown
The `di` module provides dependency injection container services.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(injector: Injector, key: Key)
:markdown

View File

@ -1,83 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/binding.ts#L24-L34">angular2/src/core/di/binding.ts (line 24)</a>
:markdown
The `di` module provides dependency injection container services.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(key: Key, optional: boolean, lowerBoundVisibility: any, upperBoundVisibility: any, properties: any[])
:markdown
.l-sub-section
h3 key
:markdown
.l-sub-section
h3 optional
:markdown
.l-sub-section
h3 lowerBoundVisibility
:markdown
.l-sub-section
h3 upperBoundVisibility
:markdown
.l-sub-section
h3 properties
:markdown

View File

@ -1,30 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/metadata.ts#L34-L65">angular2/src/core/di/metadata.ts (line 34)</a>
:markdown
The `di` module provides dependency injection container services.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation CONST
pre.prettyprint
code.
@CONST()
.l-main-section
h2 Members
.l-sub-section
h3 token
:markdown

View File

@ -1,24 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/injector.ts#L366-L373">angular2/src/core/di/injector.ts (line 366)</a>
:markdown
The `di` module provides dependency injection container services.
.l-main-section
h2 Members
.l-sub-section
h3 getDependency
pre.prettyprint
code.
getDependency(injector: Injector, binding: ResolvedBinding, dependency: Dependency)
:markdown

View File

@ -1,7 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/forward_ref.ts#L1-L3">angular2/src/core/di/forward_ref.ts (line 1)</a>
:markdown
The `di` module provides dependency injection container services.

View File

@ -1,11 +0,0 @@
.l-main-section
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/decorators.ts#L82-L82">angular2/src/core/di/decorators.ts (line 82)</a>
:markdown
Factory for creating <a href='HostMetadata-class.html'><code>HostMetadata</code></a>.

View File

@ -1,7 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/decorators.ts#L41-L49">angular2/src/core/di/decorators.ts (line 41)</a>
:markdown
The `di` module provides dependency injection container services.

View File

@ -1,34 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/metadata.ts#L138-L166">angular2/src/core/di/metadata.ts (line 138)</a>
:markdown
The `di` module provides dependency injection container services.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation CONST
pre.prettyprint
code.
@CONST()
.l-main-section
h2 Members
.l-sub-section
h3 toString
pre.prettyprint
code.
toString()
:markdown

View File

@ -1,11 +0,0 @@
.l-main-section
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/decorators.ts#L62-L62">angular2/src/core/di/decorators.ts (line 62)</a>
:markdown
Factory for creating <a href='InjectMetadata-class.html'><code>InjectMetadata</code></a>.

View File

@ -1,7 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/decorators.ts#L9-L17">angular2/src/core/di/decorators.ts (line 9)</a>
:markdown
The `di` module provides dependency injection container services.

View File

@ -1,61 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/metadata.ts#L1-L17">angular2/src/core/di/metadata.ts (line 1)</a>
:markdown
The `di` module provides dependency injection container services.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation CONST
pre.prettyprint
code.
@CONST()
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(token: any)
:markdown
.l-sub-section
h3 token
:markdown
.l-sub-section
h3 toString
pre.prettyprint
code.
toString()
:markdown

View File

@ -1,11 +0,0 @@
.l-main-section
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/decorators.ts#L72-L72">angular2/src/core/di/decorators.ts (line 72)</a>
:markdown
Factory for creating <a href='InjectableMetadata-class.html'><code>InjectableMetadata</code></a>.

View File

@ -1,7 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/decorators.ts#L25-L33">angular2/src/core/di/decorators.ts (line 25)</a>
:markdown
The `di` module provides dependency injection container services.

View File

@ -1,33 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/metadata.ts#L65-L83">angular2/src/core/di/metadata.ts (line 65)</a>
:markdown
The `di` module provides dependency injection container services.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation CONST
pre.prettyprint
code.
@CONST()
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor()
:markdown

View File

@ -1,214 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/injector.ts#L373-L799">angular2/src/core/di/injector.ts (line 373)</a>
:markdown
The `di` module provides dependency injection container services.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(_proto: ProtoInjector, _parent?: Injector, _depProvider?: DependencyProvider, _debugContext?: Function)
:markdown
.l-sub-section
h3 debugContext
pre.prettyprint
code.
debugContext()
:markdown
Returns debug information about the injector.
This information is included into exceptions thrown by the injector.
.l-sub-section
h3 get
pre.prettyprint
code.
get(token: any)
:markdown
Retrieves an instance from the injector.
.l-sub-section
h3 getOptional
pre.prettyprint
code.
getOptional(token: any)
:markdown
Retrieves an instance from the injector.
.l-sub-section
h3 getAt
pre.prettyprint
code.
getAt(index: number)
:markdown
Retrieves an instance from the injector.
.l-sub-section
h3 parent
:markdown
Direct parent of this injector.
.l-sub-section
h3 internalStrategy
:markdown
Internal. Do not use.
We return `any` not to export the InjectorStrategy type.
.l-sub-section
h3 resolveAndCreateChild
pre.prettyprint
code.
resolveAndCreateChild(bindings: Array&lt;Type | Binding | any[]&gt;, depProvider?: DependencyProvider)
:markdown
Creates a child injector and loads a new set of bindings into it.
A resolution is a process of flattening multiple nested lists and converting individual
bindings into a list of <a href='ResolvedBinding-class.html'><code>ResolvedBinding</code></a>s. The resolution can be cached by `resolve`
for the <a href='Injector-class.html'><code>Injector</code></a> for performance-sensitive code.
.l-sub-section
h3 createChildFromResolved
pre.prettyprint
code.
createChildFromResolved(bindings: ResolvedBinding[], depProvider?: DependencyProvider)
:markdown
Creates a child injector and loads a new set of <a href='ResolvedBinding-class.html'><code>ResolvedBinding</code></a>s into it.
.l-sub-section
h3 resolveAndInstantiate
pre.prettyprint
code.
resolveAndInstantiate(binding: Type | Binding)
:markdown
Resolves a binding and instantiates an object in the context of the injector.
.l-sub-section
h3 instantiateResolved
pre.prettyprint
code.
instantiateResolved(binding: ResolvedBinding)
:markdown
Instantiates an object using a resolved bindin in the context of the injector.
.l-sub-section
h3 displayName
:markdown
.l-sub-section
h3 toString
pre.prettyprint
code.
toString()
:markdown

View File

@ -1,35 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/exceptions.ts#L95-L113">angular2/src/core/di/exceptions.ts (line 95)</a>
:markdown
The `di` module provides dependency injection container services.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(injector: Injector, originalException: any, originalStack: any, key: Key)
:markdown
.l-sub-section
h3 causeKey
:markdown

View File

@ -1,51 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/exceptions.ts#L113-L128">angular2/src/core/di/exceptions.ts (line 113)</a>
:markdown
The `di` module provides dependency injection container services.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(binding: any)
:markdown
.l-sub-section
h3 message
:markdown
.l-sub-section
h3 toString
pre.prettyprint
code.
toString()
:markdown

View File

@ -1,59 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/key.ts#L6-L36">angular2/src/core/di/key.ts (line 6)</a>
:markdown
The `di` module provides dependency injection container services.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(token: Object, id: number)
:markdown
.l-sub-section
h3 token
:markdown
.l-sub-section
h3 id
:markdown
.l-sub-section
h3 displayName
:markdown

View File

@ -1,36 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/key.ts#L36-L64">angular2/src/core/di/key.ts (line 36)</a>
:markdown
The `di` module provides dependency injection container services.
.l-main-section
h2 Members
.l-sub-section
h3 get
pre.prettyprint
code.
get(token: Object)
:markdown
.l-sub-section
h3 numberOfKeys
:markdown

View File

@ -1,63 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/exceptions.ts#L128-L156">angular2/src/core/di/exceptions.ts (line 128)</a>
:markdown
The `di` module provides dependency injection container services.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(typeOrFunc: any, params: any[][])
:markdown
.l-sub-section
h3 name
:markdown
.l-sub-section
h3 message
:markdown
.l-sub-section
h3 toString
pre.prettyprint
code.
toString()
:markdown

View File

@ -1,23 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/exceptions.ts#L58-L71">angular2/src/core/di/exceptions.ts (line 58)</a>
:markdown
The `di` module provides dependency injection container services.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(injector: Injector, key: Key)
:markdown

View File

@ -1,49 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/opaque_token.ts#L1-L10">angular2/src/core/di/opaque_token.ts (line 1)</a>
:markdown
The `di` module provides dependency injection container services.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation CONST
pre.prettyprint
code.
@CONST()
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(desc: string)
:markdown
.l-sub-section
h3 toString
pre.prettyprint
code.
toString()
:markdown

View File

@ -1,11 +0,0 @@
.l-main-section
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/decorators.ts#L67-L67">angular2/src/core/di/decorators.ts (line 67)</a>
:markdown
Factory for creating <a href='OptionalMetadata-class.html'><code>OptionalMetadata</code></a>.

View File

@ -1,7 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/decorators.ts#L17-L25">angular2/src/core/di/decorators.ts (line 17)</a>
:markdown
The `di` module provides dependency injection container services.

View File

@ -1,34 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/metadata.ts#L17-L34">angular2/src/core/di/metadata.ts (line 17)</a>
:markdown
The `di` module provides dependency injection container services.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation CONST
pre.prettyprint
code.
@CONST()
.l-main-section
h2 Members
.l-sub-section
h3 toString
pre.prettyprint
code.
toString()
:markdown

View File

@ -1,51 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/exceptions.ts#L156-L169">angular2/src/core/di/exceptions.ts (line 156)</a>
:markdown
The `di` module provides dependency injection container services.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(index: any)
:markdown
.l-sub-section
h3 message
:markdown
.l-sub-section
h3 toString
pre.prettyprint
code.
toString()
:markdown

View File

@ -1,51 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/injector.ts#L175-L189">angular2/src/core/di/injector.ts (line 175)</a>
:markdown
The `di` module provides dependency injection container services.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(bwv: BindingWithVisibility[])
:markdown
.l-sub-section
h3 numberOfBindings
:markdown
.l-sub-section
h3 getBindingAtIndex
pre.prettyprint
code.
getBindingAtIndex(index: number)
:markdown

View File

@ -1,62 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/binding.ts#L217-L242">angular2/src/core/di/binding.ts (line 217)</a>
:markdown
The `di` module provides dependency injection container services.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(key: Key, factory: Function, dependencies: Dependency[])
:markdown
.l-sub-section
h3 key
:markdown
A key, usually a `Type`.
.l-sub-section
h3 factory
:markdown
Factory function which can return an instance of an object represented by a key.
.l-sub-section
h3 dependencies
:markdown
Arguments (dependencies) to the `factory` function.

View File

@ -1,11 +0,0 @@
.l-main-section
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/decorators.ts#L77-L77">angular2/src/core/di/decorators.ts (line 77)</a>
:markdown
Factory for creating <a href='SelfMetadata-class.html'><code>SelfMetadata</code></a>.

View File

@ -1,7 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/decorators.ts#L33-L41">angular2/src/core/di/decorators.ts (line 33)</a>
:markdown
The `di` module provides dependency injection container services.

View File

@ -1,34 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/metadata.ts#L83-L106">angular2/src/core/di/metadata.ts (line 83)</a>
:markdown
The `di` module provides dependency injection container services.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation CONST
pre.prettyprint
code.
@CONST()
.l-main-section
h2 Members
.l-sub-section
h3 toString
pre.prettyprint
code.
toString()
:markdown

View File

@ -1,11 +0,0 @@
.l-main-section
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/decorators.ts#L87-L87">angular2/src/core/di/decorators.ts (line 87)</a>
:markdown
Factory for creating <a href='SkipSelfMetadata-class.html'><code>SkipSelfMetadata</code></a>.

View File

@ -1,7 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/decorators.ts#L49-L57">angular2/src/core/di/decorators.ts (line 49)</a>
:markdown
The `di` module provides dependency injection container services.

View File

@ -1,34 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/metadata.ts#L106-L138">angular2/src/core/di/metadata.ts (line 106)</a>
:markdown
The `di` module provides dependency injection container services.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation CONST
pre.prettyprint
code.
@CONST()
.l-main-section
h2 Members
.l-sub-section
h3 toString
pre.prettyprint
code.
toString()
:markdown

View File

@ -1,20 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/type_literal.ts#L1-L7">angular2/src/core/di/type_literal.ts (line 1)</a>
:markdown
The `di` module provides dependency injection container services.
.l-main-section
h2 Members
.l-sub-section
h3 type
:markdown

View File

@ -1,10 +0,0 @@
.l-main-section
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/injector.ts#L19-L19">angular2/src/core/di/injector.ts (line 19)</a>
:markdown

View File

@ -1,44 +0,0 @@
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/injector.ts#L19-L25">angular2/src/core/di/injector.ts (line 19)</a>
:markdown
The `di` module provides dependency injection container services.
.l-main-section
h2 Members
.l-sub-section
h3 Public
:markdown
.l-sub-section
h3 Private
:markdown
.l-sub-section
h3 PublicAndPrivate
:markdown

View File

@ -1,189 +0,0 @@
{
"index" : {
"title" : "Di",
"intro" : "The `di` module provides dependency injection container services."
},
"InjectMetadata-class" : {
"title" : "InjectMetadata"
},
"OptionalMetadata-class" : {
"title" : "OptionalMetadata"
},
"InjectableMetadata-class" : {
"title" : "InjectableMetadata"
},
"SelfMetadata-class" : {
"title" : "SelfMetadata"
},
"HostMetadata-class" : {
"title" : "HostMetadata"
},
"SkipSelfMetadata-class" : {
"title" : "SkipSelfMetadata"
},
"DependencyMetadata-class" : {
"title" : "DependencyMetadata"
},
"forwardRef-function" : {
"title" : "forwardRef"
},
"resolveForwardRef-function" : {
"title" : "resolveForwardRef"
},
"ForwardRefFn-interface" : {
"title" : "ForwardRefFn"
},
"Injector-class" : {
"title" : "Injector"
},
"ProtoInjector-class" : {
"title" : "ProtoInjector"
},
"BindingWithVisibility-class" : {
"title" : "BindingWithVisibility"
},
"DependencyProvider-interface" : {
"title" : "DependencyProvider"
},
"Visibility-enum" : {
"title" : "Visibility"
},
"UNDEFINED-const" : {
"title" : "UNDEFINED",
"varType" : "Object"
},
"Binding-class" : {
"title" : "Binding"
},
"BindingBuilder-class" : {
"title" : "BindingBuilder"
},
"ResolvedBinding-class" : {
"title" : "ResolvedBinding"
},
"Dependency-class" : {
"title" : "Dependency"
},
"bind-function" : {
"title" : "bind"
},
"Key-class" : {
"title" : "Key"
},
"KeyRegistry-class" : {
"title" : "KeyRegistry"
},
"TypeLiteral-class" : {
"title" : "TypeLiteral"
},
"NoBindingError-class" : {
"title" : "NoBindingError"
},
"AbstractBindingError-class" : {
"title" : "AbstractBindingError"
},
"CyclicDependencyError-class" : {
"title" : "CyclicDependencyError"
},
"InstantiationError-class" : {
"title" : "InstantiationError"
},
"InvalidBindingError-class" : {
"title" : "InvalidBindingError"
},
"NoAnnotationError-class" : {
"title" : "NoAnnotationError"
},
"OutOfBoundsError-class" : {
"title" : "OutOfBoundsError"
},
"OpaqueToken-class" : {
"title" : "OpaqueToken"
},
"InjectFactory-interface" : {
"title" : "InjectFactory"
},
"OptionalFactory-interface" : {
"title" : "OptionalFactory"
},
"InjectableFactory-interface" : {
"title" : "InjectableFactory"
},
"SelfFactory-interface" : {
"title" : "SelfFactory"
},
"HostFactory-interface" : {
"title" : "HostFactory"
},
"SkipSelfFactory-interface" : {
"title" : "SkipSelfFactory"
},
"Inject-var" : {
"title" : "Inject",
"varType" : "InjectFactory"
},
"Optional-var" : {
"title" : "Optional",
"varType" : "OptionalFactory"
},
"Injectable-var" : {
"title" : "Injectable",
"varType" : "InjectableFactory"
},
"Self-var" : {
"title" : "Self",
"varType" : "SelfFactory"
},
"Host-var" : {
"title" : "Host",
"varType" : "HostFactory"
},
"SkipSelf-var" : {
"title" : "SkipSelf",
"varType" : "SkipSelfFactory"
}
}

View File

@ -1,29 +0,0 @@
.l-main-section
h2(class="function export") bind
pre.prettyprint
code.
bind(token: any) : BindingBuilder
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/binding.ts#L242-L258">angular2/src/core/di/binding.ts (line 242)</a>
:markdown
Provides an API for imperatively constructing <a href='Binding-class.html'><code>Binding</code></a>s.
This is only relevant for JavaScript. See <a href='BindingBuilder-class.html'><code>BindingBuilder</code></a>.
## Example
```javascript
bind(MyInterface).toClass(MyClass)
```

View File

@ -1,41 +0,0 @@
.l-main-section
h2(class="function export") forwardRef
pre.prettyprint
code.
forwardRef(forwardRefFn: ForwardRefFn) : Type
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/forward_ref.ts#L3-L33">angular2/src/core/di/forward_ref.ts (line 3)</a>
:markdown
Allows to refer to references which are not yet defined.
This situation arises when the key which we need te refer to for the purposes of DI is declared,
but not yet defined.
## Example:
```
class Door {
// Incorrect way to refer to a reference which is defined later.
// This fails because `Lock` is undefined at this point.
constructor(lock:Lock) { }
// Correct way to refer to a reference which is defined later.
// The reference needs to be captured in a closure.
constructor(@Inject(forwardRef(() => Lock)) lock:Lock) { }
}
// Only at this point the lock is defined.
class Lock {
}
```

View File

@ -1,11 +0,0 @@
p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/di.ts#L1-L41">angular2/di.ts (line 1)</a>
ul
for page, slug in public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]._data
if slug != 'index'
- var url = "/docs/" + current.path[1] + "/" + current.path[2] + "/" + current.path[3] + "/" + current.path[4] + "/" + slug + ".html"
li.c8
!= partial("../../../../../_includes/_hover-card", {name: page.title, url: url })

View File

@ -1,22 +0,0 @@
.l-main-section
h2(class="function export") resolveForwardRef
pre.prettyprint
code.
resolveForwardRef(type: any) : any
p.location-badge.
exported from <a href='../di'>angular2/di</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/di/forward_ref.ts#L33-L47">angular2/src/core/di/forward_ref.ts (line 33)</a>
:markdown
Lazily retrieve the reference value.
See: <a href='forwardRef-function.html'><code>forwardRef</code></a>

View File

@ -1,49 +0,0 @@
.l-main-section
p.location-badge.
exported from <a href='../directives'>angular2/directives</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/directives.ts#L63-L64">angular2/directives.ts (line 63)</a>
:markdown
A collection of the Angular core directives that are likely to be used in each and every Angular
application.
This collection can be used to quickly enumerate all the built-in directives in the `@View`
annotation. For example,
instead of writing:
```
import {NgClass, NgIf, NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault} from 'angular2/angular2';
import {OtherDirective} from 'myDirectives';
@Component({
selector: 'my-component'
})
@View({
templateUrl: 'myComponent.html',
directives: [NgClass, NgIf, NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault, OtherDirective]
})
export class MyComponent {
...
}
```
one could import all the core directives at once:
```
import {CORE_DIRECTIVES} from 'angular2/angular2';
import {OtherDirective} from 'myDirectives';
@Component({
selector: 'my-component'
})
@View({
templateUrl: 'myComponent.html',
directives: [CORE_DIRECTIVES, OtherDirective]
})
export class MyComponent {
...
}
```

View File

@ -1,93 +0,0 @@
p.location-badge.
exported from <a href='../directives'>angular2/directives</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/directives/ng_class.ts#L15-L134">angular2/src/core/directives/ng_class.ts (line 15)</a>
:markdown
Common directives shipped with Angular.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Directive
pre.prettyprint
code.
@Directive({
selector: &#39;[ng-class]&#39;,
lifecycle: [LifecycleEvent.DoCheck, LifecycleEvent.OnDestroy],
properties: [&#39;rawClass: ng-class&#39;, &#39;initialClasses: class&#39;]
})
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(_iterableDiffers: IterableDiffers, _keyValueDiffers: KeyValueDiffers, _ngEl: ElementRef, _renderer: Renderer)
:markdown
.l-sub-section
h3 initialClasses
:markdown
.l-sub-section
h3 rawClass
:markdown
.l-sub-section
h3 doCheck
pre.prettyprint
code.
doCheck()
:markdown
.l-sub-section
h3 onDestroy
pre.prettyprint
code.
onDestroy()
:markdown

View File

@ -1,109 +0,0 @@
p.location-badge.
exported from <a href='../directives'>angular2/directives</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/directives/ng_for.ts#L4-L115">angular2/src/core/directives/ng_for.ts (line 4)</a>
:markdown
Common directives shipped with Angular.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Directive
pre.prettyprint
code.
@Directive({selector: &#39;[ng-for][ng-for-of]&#39;, properties: [&#39;ngForOf&#39;], lifecycle: [LifecycleEvent.DoCheck]})
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef, iterableDiffers: IterableDiffers, cdr: ChangeDetectorRef)
:markdown
.l-sub-section
h3 viewContainer
:markdown
.l-sub-section
h3 templateRef
:markdown
.l-sub-section
h3 iterableDiffers
:markdown
.l-sub-section
h3 cdr
:markdown
.l-sub-section
h3 ngForOf
:markdown
.l-sub-section
h3 doCheck
pre.prettyprint
code.
doCheck()
:markdown

View File

@ -1,45 +0,0 @@
p.location-badge.
exported from <a href='../directives'>angular2/directives</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/directives/ng_if.ts#L3-L42">angular2/src/core/directives/ng_if.ts (line 3)</a>
:markdown
Common directives shipped with Angular.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Directive
pre.prettyprint
code.
@Directive({selector: &#39;[ng-if]&#39;, properties: [&#39;ngIf&#39;]})
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(_viewContainer: ViewContainerRef, _templateRef: TemplateRef)
:markdown
.l-sub-section
h3 ngIf
:markdown

View File

@ -1,17 +0,0 @@
p.location-badge.
exported from <a href='../directives'>angular2/directives</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/directives/ng_non_bindable.ts#L1-L18">angular2/src/core/directives/ng_non_bindable.ts (line 1)</a>
:markdown
Common directives shipped with Angular.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Directive
pre.prettyprint
code.
@Directive({selector: &#39;[ng-non-bindable]&#39;, compileChildren: false})

View File

@ -1,65 +0,0 @@
p.location-badge.
exported from <a href='../directives'>angular2/directives</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/directives/ng_style.ts#L5-L65">angular2/src/core/directives/ng_style.ts (line 5)</a>
:markdown
Common directives shipped with Angular.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Directive
pre.prettyprint
code.
@Directive({
selector: &#39;[ng-style]&#39;,
lifecycle: [LifecycleEvent.DoCheck],
properties: [&#39;rawStyle: ng-style&#39;]
})
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(_differs: KeyValueDiffers, _ngEl: ElementRef, _renderer: Renderer)
:markdown
.l-sub-section
h3 rawStyle
:markdown
.l-sub-section
h3 doCheck
pre.prettyprint
code.
doCheck()
:markdown

View File

@ -1,30 +0,0 @@
p.location-badge.
exported from <a href='../directives'>angular2/directives</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/directives/ng_switch.ts#L15-L125">angular2/src/core/directives/ng_switch.ts (line 15)</a>
:markdown
Common directives shipped with Angular.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Directive
pre.prettyprint
code.
@Directive({selector: &#39;[ng-switch]&#39;, properties: [&#39;ngSwitch&#39;]})
.l-main-section
h2 Members
.l-sub-section
h3 ngSwitch
:markdown

View File

@ -1,33 +0,0 @@
p.location-badge.
exported from <a href='../directives'>angular2/directives</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/directives/ng_switch.ts#L157-L176">angular2/src/core/directives/ng_switch.ts (line 157)</a>
:markdown
Common directives shipped with Angular.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Directive
pre.prettyprint
code.
@Directive({selector: &#39;[ng-switch-default]&#39;})
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef, sswitch: NgSwitch)
:markdown

View File

@ -1,45 +0,0 @@
p.location-badge.
exported from <a href='../directives'>angular2/directives</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/directives/ng_switch.ts#L125-L157">angular2/src/core/directives/ng_switch.ts (line 125)</a>
:markdown
Common directives shipped with Angular.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Directive
pre.prettyprint
code.
@Directive({selector: &#39;[ng-switch-when]&#39;, properties: [&#39;ngSwitchWhen&#39;]})
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef, _switch: NgSwitch)
:markdown
.l-sub-section
h3 ngSwitchWhen
:markdown

View File

@ -1,47 +0,0 @@
p.location-badge.
exported from <a href='../directives'>angular2/directives</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/directives/ng_for.ts#L115-L124">angular2/src/core/directives/ng_for.ts (line 115)</a>
:markdown
Common directives shipped with Angular.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(record: any, view: any)
:markdown
.l-sub-section
h3 view
:markdown
.l-sub-section
h3 record
:markdown

View File

@ -1,55 +0,0 @@
p.location-badge.
exported from <a href='../directives'>angular2/directives</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/core/directives/ng_switch.ts#L7-L15">angular2/src/core/directives/ng_switch.ts (line 7)</a>
:markdown
Common directives shipped with Angular.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(_viewContainerRef: ViewContainerRef, _templateRef: TemplateRef)
:markdown
.l-sub-section
h3 create
pre.prettyprint
code.
create()
:markdown
.l-sub-section
h3 destroy
pre.prettyprint
code.
destroy()
:markdown

View File

@ -1,50 +0,0 @@
{
"index" : {
"title" : "Directives",
"intro" : "Common directives shipped with Angular."
},
"CORE_DIRECTIVES-const" : {
"title" : "CORE_DIRECTIVES"
},
"NgClass-class" : {
"title" : "NgClass"
},
"NgFor-class" : {
"title" : "NgFor"
},
"RecordViewTuple-class" : {
"title" : "RecordViewTuple"
},
"NgIf-class" : {
"title" : "NgIf"
},
"NgNonBindable-class" : {
"title" : "NgNonBindable"
},
"NgStyle-class" : {
"title" : "NgStyle"
},
"SwitchView-class" : {
"title" : "SwitchView"
},
"NgSwitch-class" : {
"title" : "NgSwitch"
},
"NgSwitchWhen-class" : {
"title" : "NgSwitchWhen"
},
"NgSwitchDefault-class" : {
"title" : "NgSwitchDefault"
}
}

View File

@ -1,11 +0,0 @@
p.location-badge.
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/directives.ts#L1-L65">angular2/directives.ts (line 1)</a>
ul
for page, slug in public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]._data
if slug != 'index'
- var url = "/docs/" + current.path[1] + "/" + current.path[2] + "/" + current.path[3] + "/" + current.path[4] + "/" + slug + ".html"
li.c8
!= partial("../../../../../_includes/_hover-card", {name: page.title, url: url })

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