docs(alpha-37): adding the files that I missed in the alpha-37 update

This commit is contained in:
Naomi Black
2015-09-14 15:01:08 -07:00
parent b821f7fa5f
commit 31b68b2aec
305 changed files with 19543 additions and 0 deletions
@@ -0,0 +1,24 @@
.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.37/modules/angular2/src/core/application_tokens.ts#L26-L26">angular2/src/core/application_tokens.ts (line 26)</a>
:markdown
An <a href='angular2/di/OpaqueToken'>OpaqueToken</a> representing the application root type in the <a href='Injector-class.html'><code>Injector</code></a>.
```
@Component(...)
@View(...)
class MyApp {
...
}
bootstrap(MyApp).then((appRef:ApplicationRef) {
expect(appRef.injector.get(appComponentTypeToken)).toEqual(MyApp);
});
```
@@ -0,0 +1,11 @@
.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.37/modules/angular2/src/core/render/dom/dom_tokens.ts#L9-L9">angular2/src/core/render/dom/dom_tokens.ts (line 9)</a>
:markdown
A unique id (string) for an angular application.
@@ -0,0 +1,111 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/exceptions.ts#L28-L56">angular2/src/core/di/exceptions.ts (line 28)</a>
:markdown
Starting point to import all public core APIs.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(injector: Injector, key: Key, constructResolvingMessage: Function)
: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
@@ -0,0 +1,271 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/forms/model.ts#L37-L135">angular2/src/core/forms/model.ts (line 37)</a>
:markdown
Starting point to import all public core APIs.
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(validator: Function)
:markdown
.l-sub-section
h3 validator
:markdown
.l-sub-section
h3 value
:markdown
.l-sub-section
h3 status
:markdown
.l-sub-section
h3 valid
:markdown
.l-sub-section
h3 errors
:markdown
.l-sub-section
h3 pristine
:markdown
.l-sub-section
h3 dirty
:markdown
.l-sub-section
h3 touched
:markdown
.l-sub-section
h3 untouched
:markdown
.l-sub-section
h3 valueChanges
:markdown
.l-sub-section
h3 markAsTouched
pre.prettyprint
code.
markAsTouched()
:markdown
.l-sub-section
h3 markAsDirty
pre.prettyprint
code.
markAsDirty({onlySelf}?: {onlySelf?: boolean})
:markdown
.l-sub-section
h3 setParent
pre.prettyprint
code.
setParent(parent: ControlGroup | ControlArray)
:markdown
.l-sub-section
h3 updateValidity
pre.prettyprint
code.
updateValidity({onlySelf}?: {onlySelf?: boolean})
:markdown
.l-sub-section
h3 updateValueAndValidity
pre.prettyprint
code.
updateValueAndValidity({onlySelf, emitEvent}?: {onlySelf?: boolean, emitEvent?: boolean})
:markdown
.l-sub-section
h3 find
pre.prettyprint
code.
find(path: Array&lt;string | number&gt;| string)
:markdown
.l-sub-section
h3 getError
pre.prettyprint
code.
getError(errorCode: string, path?: string[])
:markdown
.l-sub-section
h3 hasError
pre.prettyprint
code.
hasError(errorCode: string, path?: string[])
:markdown
@@ -0,0 +1,104 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/forms/directives/abstract_control_directive.ts#L1-L19">angular2/src/core/forms/directives/abstract_control_directive.ts (line 1)</a>
:markdown
Starting point to import all public core APIs.
.l-main-section
h2 Members
.l-sub-section
h3 control
:markdown
.l-sub-section
h3 value
:markdown
.l-sub-section
h3 valid
:markdown
.l-sub-section
h3 errors
:markdown
.l-sub-section
h3 pristine
:markdown
.l-sub-section
h3 dirty
:markdown
.l-sub-section
h3 touched
:markdown
.l-sub-section
h3 untouched
:markdown
@@ -0,0 +1,24 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/interfaces.ts#L124-L142">angular2/src/core/compiler/interfaces.ts (line 124)</a>
:markdown
Starting point to import all public core APIs.
.l-main-section
h2 Members
.l-sub-section
h3 afterContentChecked
pre.prettyprint
code.
afterContentChecked()
:markdown
@@ -0,0 +1,24 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/interfaces.ts#L106-L124">angular2/src/core/compiler/interfaces.ts (line 106)</a>
:markdown
Starting point to import all public core APIs.
.l-main-section
h2 Members
.l-sub-section
h3 afterContentInit
pre.prettyprint
code.
afterContentInit()
:markdown
@@ -0,0 +1,24 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/interfaces.ts#L160-L178">angular2/src/core/compiler/interfaces.ts (line 160)</a>
:markdown
Starting point to import all public core APIs.
.l-main-section
h2 Members
.l-sub-section
h3 afterViewChecked
pre.prettyprint
code.
afterViewChecked()
:markdown
@@ -0,0 +1,24 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/interfaces.ts#L142-L160">angular2/src/core/compiler/interfaces.ts (line 142)</a>
:markdown
Starting point to import all public core APIs.
.l-main-section
h2 Members
.l-sub-section
h3 afterViewInit
pre.prettyprint
code.
afterViewInit()
:markdown
@@ -0,0 +1,47 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/services/app_root_url.ts#L2-L25">angular2/src/core/services/app_root_url.ts (line 2)</a>
:markdown
Starting point to import all public core APIs.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Injectable
pre.prettyprint
code.
@Injectable()
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(value: string)
:markdown
.l-sub-section
h3 value
:markdown
Returns the base URL of the currently running application.
@@ -0,0 +1,265 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/view_manager.ts#L19-L379">angular2/src/core/compiler/view_manager.ts (line 19)</a>
:markdown
Starting point to import all public core APIs.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Injectable
pre.prettyprint
code.
@Injectable()
.l-main-section
h2 Members
.l-sub-section
h3 getViewContainer
pre.prettyprint
code.
getViewContainer(location: ElementRef)
:markdown
Returns a <a href='ViewContainerRef-interface.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-interface.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='Injector-class.html'><code>Injector</code></a> to use as parent injector for the view.
See <a href='AppViewManager-interface.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-interface.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-interface.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-interface.html#destroyViewInContainer'><code>AppViewManager</code></a>.
.l-sub-section
h3 destroyViewInContainer
pre.prettyprint
code.
destroyViewInContainer(viewContainerLocation: ElementRef, atIndex: number)
:markdown
See <a href='AppViewManager-interface.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-interface.html#detachViewInContainer'><code>AppViewManager</code></a>.
.l-sub-section
h3 detachViewInContainer
pre.prettyprint
code.
detachViewInContainer(viewContainerLocation: ElementRef, atIndex: number)
:markdown
See <a href='AppViewManager-interface.html#attachViewInContainer'><code>AppViewManager</code></a>.
@@ -0,0 +1,64 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/application_ref.ts#L3-L47">angular2/src/core/application_ref.ts (line 3)</a>
:markdown
Starting point to import all public core APIs.
.l-main-section
h2 Members
.l-sub-section
h3 hostComponentType
:markdown
Returns the current <a href='ComponentMetadata-class.html'><code>ComponentMetadata</code></a> type.
.l-sub-section
h3 hostComponent
:markdown
Returns the current <a href='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='Injector-class.html'><code>Injector</code></a>.
@@ -0,0 +1,72 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/pipes/async_pipe.ts#L35-L133">angular2/src/core/pipes/async_pipe.ts (line 35)</a>
:markdown
Starting point to import all public core APIs.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Pipe
pre.prettyprint
code.
@Pipe({name: &#39;async&#39;, pure: false})
.l-sub-section
h3.annotation Injectable
pre.prettyprint
code.
@Injectable()
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(_ref: ChangeDetectorRef)
:markdown
.l-sub-section
h3 onDestroy
pre.prettyprint
code.
onDestroy()
:markdown
.l-sub-section
h3 transform
pre.prettyprint
code.
transform(obj: Observable | Promise&lt;any&gt;, args?: any[])
:markdown
@@ -0,0 +1,11 @@
.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.37/modules/angular2/src/core/metadata.ts#L503-L503">angular2/src/core/metadata.ts (line 503)</a>
:markdown
<a href='AttributeMetadata-class.html'><code>AttributeMetadata</code></a> factory function.
@@ -0,0 +1,7 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L278-L329">angular2/src/core/metadata.ts (line 278)</a>
:markdown
Starting point to import all public core APIs.
@@ -0,0 +1,66 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata/di.ts#L9-L50">angular2/src/core/metadata/di.ts (line 9)</a>
:markdown
Starting point to import all public core APIs.
.l-main-section
h2 Annotations
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(attributeName: string)
:markdown
.l-sub-section
h3 attributeName
:markdown
.l-sub-section
h3 token
:markdown
.l-sub-section
h3 toString
pre.prettyprint
code.
toString()
:markdown
@@ -0,0 +1,240 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/binding.ts#L41-L229">angular2/src/core/di/binding.ts (line 41)</a>
:markdown
Starting point to import all public core APIs.
.l-main-section
h2 Annotations
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(token: any, {toClass, toValue, toAlias, toFactory, deps, multi}: {
toClass?: Type,
toValue?: any,
toAlias?: any,
toFactory?: Function,
deps?: Object[],
multi?: boolean
})
: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.
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,
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.
Because `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 multi
:markdown
Used to create multiple bindings matching the same token.
```javascript
var injector = Injector.resolveAndCreate([
new Binding("Strings", { toValue: "String1", multi: true}),
new Binding("Strings", { toValue: "String2", multi: true})
]);
expect(injector.get("Strings")).toEqual(["String1", "String2"]);
```
Multi bindings and regular bindings cannot be mixed. The following
will throw an exception:
```javascript
var injector = Injector.resolveAndCreate([
new Binding("Strings", { toValue: "String1", multi: true}),
new Binding("Strings", { toValue: "String2"})
]);
```
@@ -0,0 +1,183 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/binding.ts#L305-L419">angular2/src/core/di/binding.ts (line 305)</a>
:markdown
Starting point to import all public core APIs.
.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.)
Because `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');
```
@@ -0,0 +1,63 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/di/injector.ts#L381-L387">angular2/src/core/di/injector.ts (line 381)</a>
:markdown
Starting point to import all public core APIs.
.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
@@ -0,0 +1,7 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/debug/debug_element.ts#L184-L199">angular2/src/core/debug/debug_element.ts (line 184)</a>
:markdown
Starting point to import all public core APIs.
@@ -0,0 +1,49 @@
.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.37/modules/angular2/src/core/directives.ts#L63-L64">angular2/src/core/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 {
...
}
```
@@ -0,0 +1,36 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/change_detection/exceptions.ts#L17-L34">angular2/src/core/change_detection/exceptions.ts (line 17)</a>
:markdown
Starting point to import all public core APIs.
.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.
@@ -0,0 +1,103 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/change_detection/constants.ts#L8-L49">angular2/src/core/change_detection/constants.ts (line 8)</a>
:markdown
Starting point to import all public core APIs.
.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.
@@ -0,0 +1,220 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/change_detection/interfaces.ts#L55-L74">angular2/src/core/change_detection/interfaces.ts (line 55)</a>
:markdown
Starting point to import all public core APIs.
.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
@@ -0,0 +1,64 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/change_detection/change_detector_ref.ts#L2-L38">angular2/src/core/change_detection/change_detector_ref.ts (line 2)</a>
:markdown
Starting point to import all public core APIs.
.l-main-section
h2 Members
.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.
@@ -0,0 +1,190 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/forms/directives/checkbox_value_accessor.ts#L9-L66">angular2/src/core/forms/directives/checkbox_value_accessor.ts (line 9)</a>
:markdown
Starting point to import all public core APIs.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Directive
pre.prettyprint
code.
@Directive({
selector:
&#39;input[type=checkbox][ng-control],input[type=checkbox][ng-form-control],input[type=checkbox][ng-model]&#39;,
host: {
&#39;(change)&#39;: &#39;onChange($event.target.checked)&#39;,
&#39;(blur)&#39;: &#39;onTouched()&#39;,
&#39;[class.ng-untouched]&#39;: &#39;ngClassUntouched&#39;,
&#39;[class.ng-touched]&#39;: &#39;ngClassTouched&#39;,
&#39;[class.ng-pristine]&#39;: &#39;ngClassPristine&#39;,
&#39;[class.ng-dirty]&#39;: &#39;ngClassDirty&#39;,
&#39;[class.ng-valid]&#39;: &#39;ngClassValid&#39;,
&#39;[class.ng-invalid]&#39;: &#39;ngClassInvalid&#39;
}
})
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(cd: NgControl, _renderer: Renderer, _elementRef: ElementRef)
:markdown
.l-sub-section
h3 onChange
:markdown
.l-sub-section
h3 onTouched
:markdown
.l-sub-section
h3 writeValue
pre.prettyprint
code.
writeValue(value: any)
:markdown
.l-sub-section
h3 ngClassUntouched
:markdown
.l-sub-section
h3 ngClassTouched
:markdown
.l-sub-section
h3 ngClassPristine
:markdown
.l-sub-section
h3 ngClassDirty
:markdown
.l-sub-section
h3 ngClassValid
:markdown
.l-sub-section
h3 ngClassInvalid
:markdown
.l-sub-section
h3 registerOnChange
pre.prettyprint
code.
registerOnChange(fn: (_: any) =&gt; {})
:markdown
.l-sub-section
h3 registerOnTouched
pre.prettyprint
code.
registerOnTouched(fn: () =&gt; {})
:markdown
@@ -0,0 +1,98 @@
.l-main-section
h2(class="function export") Class
pre.prettyprint
code.
Class(clsDef: ClassDefinition) : Type
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/util/decorators.ts#L119-L226">angular2/src/core/util/decorators.ts (line 119)</a>
:markdown
Provides a way for expressing ES6 classes with parameter annotations in ES5.
## Basic Example
```
var Greeter = ng.Class({
constructor: function(name) {
this.name = name;
},
greet: function() {
alert('Hello ' + this.name + '!');
}
});
```
is equivalent to ES6:
```
class Greeter {
constructor(name) {
this.name = name;
}
greet() {
alert('Hello ' + this.name + '!');
}
}
```
or equivalent to ES5:
```
var Greeter = function (name) {
this.name = name;
}
Greeter.prototype.greet = function () {
alert('Hello ' + this.name + '!');
}
```
## Example with parameter annotations
```
var MyService = ng.Class({
constructor: [String, [new Query(), QueryList], function(name, queryList) {
...
}]
});
```
is equivalent to ES6:
```
class MyService {
constructor(name: string, @Query() queryList: QueryList) {
...
}
}
```
## Example with inheritance
```
var Shape = ng.Class({
constructor: (color) {
this.color = color;
}
});
var Square = ng.Class({
extends: Shape,
constructor: function(color, size) {
Shape.call(this, color);
this.size = size;
}
});
```
@@ -0,0 +1,40 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/util/decorators.ts#L1-L22">angular2/src/core/util/decorators.ts (line 1)</a>
:markdown
Starting point to import all public core APIs.
.l-main-section
h2 Members
.l-sub-section
h3 extends?
:markdown
Optional argument for specifying the superclass.
.l-sub-section
h3 constructor
:markdown
Required constructor function for a class.
The function may be optionally wrapped in an `Array`, in which case additional parameter
annotations may be specified.
The number of arguments and the number of parameter annotations must match.
See <a href='Class-function.html'><code>Class</code></a> for example of usage.
@@ -0,0 +1,34 @@
p.location-badge.
exported from <a href='../core'>angular2/core</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/compiler.ts#L71-L361">angular2/src/core/compiler/compiler.ts (line 71)</a>
:markdown
Starting point to import all public core APIs.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Injectable
pre.prettyprint
code.
@Injectable()
.l-main-section
h2 Members
.l-sub-section
h3 compileInHost
pre.prettyprint
code.
compileInHost(componentTypeOrBinding: Type | Binding)
:markdown
@@ -0,0 +1,11 @@
.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.37/modules/angular2/src/core/metadata.ts#L487-L488">angular2/src/core/metadata.ts (line 487)</a>
:markdown
<a href='ComponentMetadata-class.html'><code>ComponentMetadata</code></a> factory function.

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