docs: renames for the API public surface per alpha-35
This commit is contained in:
parent
2aa4751216
commit
b9a53c023d
|
@ -3,7 +3,7 @@
|
||||||
h2 Attribute <span class="type">variable</span>
|
h2 Attribute <span class="type">variable</span>
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../annotations'>angular2/annotations</a>
|
exported from <a href='../annotations'>angular2/annotations</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L360-L360">angular2/src/core/annotations/decorators.ts (line 360)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L391-L391">angular2/src/core/annotations/decorators.ts (line 391)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
<a href='Attribute-var.html'><code>Attribute</code></a> factory function.
|
<a href='Attribute-var.html'><code>Attribute</code></a> factory function.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../annotations'>angular2/annotations</a>
|
exported from <a href='../annotations'>angular2/annotations</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L236-L287">angular2/src/core/annotations/decorators.ts (line 236)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L243-L294">angular2/src/core/annotations/decorators.ts (line 243)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
<a href='Attribute-var.html'><code>Attribute</code></a> factory for creating annotations, decorators or DSL.
|
<a href='Attribute-var.html'><code>Attribute</code></a> factory for creating annotations, decorators or DSL.
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
h2 Component <span class="type">variable</span>
|
h2 Component <span class="type">variable</span>
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../annotations'>angular2/annotations</a>
|
exported from <a href='../annotations'>angular2/annotations</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L344-L345">angular2/src/core/annotations/decorators.ts (line 344)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L375-L376">angular2/src/core/annotations/decorators.ts (line 375)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
<a href='Component-var.html'><code>Component</code></a> factory function.
|
<a href='Component-var.html'><code>Component</code></a> factory function.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../annotations'>angular2/annotations</a>
|
exported from <a href='../annotations'>angular2/annotations</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations_impl/annotations.ts#L778-L900">angular2/src/core/annotations_impl/annotations.ts (line 778)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations_impl/annotations.ts#L754-L876">angular2/src/core/annotations_impl/annotations.ts (line 754)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Declare reusable UI building blocks for an application.
|
Declare reusable UI building blocks for an application.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../annotations'>angular2/annotations</a>
|
exported from <a href='../annotations'>angular2/annotations</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L13-L32">angular2/src/core/annotations/decorators.ts (line 13)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L18-L38">angular2/src/core/annotations/decorators.ts (line 18)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Interface for the <a href='Component-var.html'><code>Component</code></a> decorator function.
|
Interface for the <a href='Component-var.html'><code>Component</code></a> decorator function.
|
||||||
|
@ -21,6 +21,7 @@ p.location-badge.
|
||||||
templateUrl?: string,
|
templateUrl?: string,
|
||||||
template?: string,
|
template?: string,
|
||||||
directives?: List<Type | any | List<any>>,
|
directives?: List<Type | any | List<any>>,
|
||||||
|
pipes?: List<Type | any | List<any>>,
|
||||||
renderer?: string,
|
renderer?: string,
|
||||||
styles?: List<string>,
|
styles?: List<string>,
|
||||||
styleUrls?: List<string>,
|
styleUrls?: List<string>,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../annotations'>angular2/annotations</a>
|
exported from <a href='../annotations'>angular2/annotations</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L104-L174">angular2/src/core/annotations/decorators.ts (line 104)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L111-L181">angular2/src/core/annotations/decorators.ts (line 111)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
<a href='ComponentAnnotation-class.html'><code>ComponentAnnotation</code></a> factory for creating annotations, decorators or DSL.
|
<a href='ComponentAnnotation-class.html'><code>ComponentAnnotation</code></a> factory for creating annotations, decorators or DSL.
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
h2 Directive <span class="type">variable</span>
|
h2 Directive <span class="type">variable</span>
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../annotations'>angular2/annotations</a>
|
exported from <a href='../annotations'>angular2/annotations</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L349-L349">angular2/src/core/annotations/decorators.ts (line 349)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L380-L380">angular2/src/core/annotations/decorators.ts (line 380)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
<a href='Directive-var.html'><code>Directive</code></a> factory function.
|
<a href='Directive-var.html'><code>Directive</code></a> factory function.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../annotations'>angular2/annotations</a>
|
exported from <a href='../annotations'>angular2/annotations</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations_impl/annotations.ts#L4-L778">angular2/src/core/annotations_impl/annotations.ts (line 4)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations_impl/annotations.ts#L4-L754">angular2/src/core/annotations_impl/annotations.ts (line 4)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Directives allow you to attach behavior to elements in the DOM.
|
Directives allow you to attach behavior to elements in the DOM.
|
||||||
|
@ -471,7 +471,7 @@ p.location-badge.
|
||||||
- `directiveProperty` specifies the component property where the value is written.
|
- `directiveProperty` specifies the component property where the value is written.
|
||||||
- `bindingProperty` specifies the DOM property where the value is read from.
|
- `bindingProperty` specifies the DOM property where the value is read from.
|
||||||
|
|
||||||
You can include a <a href='../change_detection/Pipe-interface.html'><code>Pipe</code></a> when specifying a `bindingProperty` to allow for data
|
You can include a <a href='Pipe-var.html'><code>Pipe</code></a> when specifying a `bindingProperty` to allow for data
|
||||||
transformation and structural change detection of the value. These pipes will be evaluated in
|
transformation and structural change detection of the value. These pipes will be evaluated in
|
||||||
the context of this component.
|
the context of this component.
|
||||||
|
|
||||||
|
@ -522,38 +522,14 @@ p.location-badge.
|
||||||
Whenever the `someExpression` expression changes, the `properties` declaration instructs
|
Whenever the `someExpression` expression changes, the `properties` declaration instructs
|
||||||
Angular to update the `Tooltip`'s `text` property.
|
Angular to update the `Tooltip`'s `text` property.
|
||||||
|
|
||||||
## Bindings With Pipes
|
### Bindings With Pipes
|
||||||
|
|
||||||
You can also use pipes when writing binding definitions for a directive.
|
You can use pipes in bindings, as follows:
|
||||||
|
|
||||||
For example, we could write a binding that updates the directive on structural changes, rather
|
|
||||||
than on reference changes, as normally occurs in change detection.
|
|
||||||
|
|
||||||
See <a href='../change_detection/Pipe-interface.html'><code>Pipe</code></a> and `KeyValueChanges` documentation for more details.
|
|
||||||
|
|
||||||
```
|
|
||||||
@Directive({
|
|
||||||
selector: '[class-set]',
|
|
||||||
properties: [
|
|
||||||
'classChanges: classSet | keyValDiff'
|
|
||||||
]
|
|
||||||
})
|
|
||||||
class ClassSet {
|
|
||||||
set classChanges(changes: KeyValueChanges) {
|
|
||||||
// This will get called every time the `class-set` expressions changes its structure.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
The template that this directive is used in may also contain its own pipes. For example:
|
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<div [class-set]="someExpression | somePipe">
|
<div [class-set]="someExpression | somePipe">
|
||||||
```
|
```
|
||||||
|
|
||||||
In this case, the two pipes compose as if they were inlined: `someExpression | somePipe |
|
|
||||||
keyValDiff`.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../annotations'>angular2/annotations</a>
|
exported from <a href='../annotations'>angular2/annotations</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L6-L13">angular2/src/core/annotations/decorators.ts (line 6)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L11-L18">angular2/src/core/annotations/decorators.ts (line 11)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Interface for the <a href='Directive-var.html'><code>Directive</code></a> decorator function.
|
Interface for the <a href='Directive-var.html'><code>Directive</code></a> decorator function.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../annotations'>angular2/annotations</a>
|
exported from <a href='../annotations'>angular2/annotations</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L51-L104">angular2/src/core/annotations/decorators.ts (line 51)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L58-L111">angular2/src/core/annotations/decorators.ts (line 58)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
<a href='Directive-var.html'><code>Directive</code></a> factory for creating annotations, decorators or DSL.
|
<a href='Directive-var.html'><code>Directive</code></a> factory for creating annotations, decorators or DSL.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../annotations'>angular2/annotations</a>
|
exported from <a href='../annotations'>angular2/annotations</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations_impl/annotations.ts#L900-L1032">angular2/src/core/annotations_impl/annotations.ts (line 900)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations_impl/annotations.ts#L876-L1008">angular2/src/core/annotations_impl/annotations.ts (line 876)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Lifecycle events are guaranteed to be called in the following order:
|
Lifecycle events are guaranteed to be called in the following order:
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
|
||||||
|
.l-main-section
|
||||||
|
h2 Pipe <span class="type">variable</span>
|
||||||
|
p.location-badge.
|
||||||
|
exported from <a href='../annotations'>angular2/annotations</a>
|
||||||
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L407-L407">angular2/src/core/annotations/decorators.ts (line 407)</a>
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
<a href='Pipe-var.html'><code>Pipe</code></a> factory function.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
|
||||||
|
p.location-badge.
|
||||||
|
exported from <a href='../annotations'>angular2/annotations</a>
|
||||||
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations_impl/annotations.ts#L1008-L1032">angular2/src/core/annotations_impl/annotations.ts (line 1008)</a>
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
Declare reusable pipe function.
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
```
|
||||||
|
@Pipe({
|
||||||
|
name: 'lowercase'
|
||||||
|
})
|
||||||
|
class Lowercase {
|
||||||
|
transform(v, args) { return v.toLowerCase(); }
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.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({name}: {name: string})
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3 name
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
|
||||||
|
p.location-badge.
|
||||||
|
exported from <a href='../annotations'>angular2/annotations</a>
|
||||||
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L345-L370">angular2/src/core/annotations/decorators.ts (line 345)</a>
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
<a href='Pipe-var.html'><code>Pipe</code></a> factory for creating decorators.
|
||||||
|
|
||||||
|
## Example as TypeScript Decorator
|
||||||
|
|
||||||
|
```
|
||||||
|
import {Pipe} from "angular2/angular2";
|
||||||
|
|
||||||
|
@Pipe({...})
|
||||||
|
class MyPipe {
|
||||||
|
constructor() {
|
||||||
|
...
|
||||||
|
}
|
||||||
|
|
||||||
|
transform(v, args) {}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
h2 Query <span class="type">variable</span>
|
h2 Query <span class="type">variable</span>
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../annotations'>angular2/annotations</a>
|
exported from <a href='../annotations'>angular2/annotations</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L365-L365">angular2/src/core/annotations/decorators.ts (line 365)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L396-L396">angular2/src/core/annotations/decorators.ts (line 396)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
<a href='Query-var.html'><code>Query</code></a> factory function.
|
<a href='Query-var.html'><code>Query</code></a> factory function.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../annotations'>angular2/annotations</a>
|
exported from <a href='../annotations'>angular2/annotations</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L287-L338">angular2/src/core/annotations/decorators.ts (line 287)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L294-L345">angular2/src/core/annotations/decorators.ts (line 294)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
<a href='Query-var.html'><code>Query</code></a> factory for creating annotations, decorators or DSL.
|
<a href='Query-var.html'><code>Query</code></a> factory for creating annotations, decorators or DSL.
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
h2 View <span class="type">variable</span>
|
h2 View <span class="type">variable</span>
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../annotations'>angular2/annotations</a>
|
exported from <a href='../annotations'>angular2/annotations</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L354-L355">angular2/src/core/annotations/decorators.ts (line 354)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L385-L386">angular2/src/core/annotations/decorators.ts (line 385)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
<a href='View-var.html'><code>View</code></a> factory function.
|
<a href='View-var.html'><code>View</code></a> factory function.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../annotations'>angular2/annotations</a>
|
exported from <a href='../annotations'>angular2/annotations</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations_impl/view.ts#L4-L113">angular2/src/core/annotations_impl/view.ts (line 4)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations_impl/view.ts#L4-L117">angular2/src/core/annotations_impl/view.ts (line 4)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Declares the available HTML templates for an application.
|
Declares the available HTML templates for an application.
|
||||||
|
@ -53,10 +53,11 @@ p.location-badge.
|
||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
constructor({templateUrl, template, directives, encapsulation, styles, styleUrls}?: {
|
constructor({templateUrl, template, directives, pipes, encapsulation, styles, styleUrls}?: {
|
||||||
templateUrl?: string,
|
templateUrl?: string,
|
||||||
template?: string,
|
template?: string,
|
||||||
directives?: List<Type | any | List<any>>,
|
directives?: List<Type | any | List<any>>,
|
||||||
|
pipes?: List<Type | any | List<any>>,
|
||||||
encapsulation?: ViewEncapsulation,
|
encapsulation?: ViewEncapsulation,
|
||||||
styles?: List<string>,
|
styles?: List<string>,
|
||||||
styleUrls?: List<string>,
|
styleUrls?: List<string>,
|
||||||
|
@ -157,6 +158,18 @@ p.location-badge.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3 pipes
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
.l-sub-section
|
||||||
h3 encapsulation
|
h3 encapsulation
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../annotations'>angular2/annotations</a>
|
exported from <a href='../annotations'>angular2/annotations</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L32-L51">angular2/src/core/annotations/decorators.ts (line 32)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L38-L58">angular2/src/core/annotations/decorators.ts (line 38)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Interface for the <a href='View-var.html'><code>View</code></a> decorator function.
|
Interface for the <a href='View-var.html'><code>View</code></a> decorator function.
|
||||||
|
@ -21,6 +21,7 @@ p.location-badge.
|
||||||
templateUrl?: string,
|
templateUrl?: string,
|
||||||
template?: string,
|
template?: string,
|
||||||
directives?: List<Type | any | List<any>>,
|
directives?: List<Type | any | List<any>>,
|
||||||
|
pipes?: List<Type | any | List<any>>,
|
||||||
renderer?: string,
|
renderer?: string,
|
||||||
styles?: List<string>,
|
styles?: List<string>,
|
||||||
styleUrls?: List<string>,
|
styleUrls?: List<string>,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../annotations'>angular2/annotations</a>
|
exported from <a href='../annotations'>angular2/annotations</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L174-L236">angular2/src/core/annotations/decorators.ts (line 174)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L181-L243">angular2/src/core/annotations/decorators.ts (line 181)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
<a href='ViewAnnotation-class.html'><code>ViewAnnotation</code></a> factory for creating annotations, decorators or DSL.
|
<a href='ViewAnnotation-class.html'><code>ViewAnnotation</code></a> factory for creating annotations, decorators or DSL.
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
h2 ViewQuery <span class="type">variable</span>
|
h2 ViewQuery <span class="type">variable</span>
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../annotations'>angular2/annotations</a>
|
exported from <a href='../annotations'>angular2/annotations</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L371-L371">angular2/src/core/annotations/decorators.ts (line 371)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L402-L402">angular2/src/core/annotations/decorators.ts (line 402)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
<a href='ViewQuery-var.html'><code>ViewQuery</code></a> factory function.
|
<a href='ViewQuery-var.html'><code>ViewQuery</code></a> factory function.
|
||||||
|
|
|
@ -12,6 +12,10 @@
|
||||||
"title" : "DirectiveAnnotation Class"
|
"title" : "DirectiveAnnotation Class"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"PipeAnnotation-class" : {
|
||||||
|
"title" : "PipeAnnotation Class"
|
||||||
|
},
|
||||||
|
|
||||||
"LifecycleEvent-enum" : {
|
"LifecycleEvent-enum" : {
|
||||||
"title" : "LifecycleEvent Enum"
|
"title" : "LifecycleEvent Enum"
|
||||||
},
|
},
|
||||||
|
@ -118,5 +122,13 @@
|
||||||
|
|
||||||
"ViewQuery-var" : {
|
"ViewQuery-var" : {
|
||||||
"title" : "ViewQuery Var"
|
"title" : "ViewQuery Var"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Pipe-var" : {
|
||||||
|
"title" : "Pipe Var"
|
||||||
|
},
|
||||||
|
|
||||||
|
"PipeFactory-interface" : {
|
||||||
|
"title" : "PipeFactory Interface"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/annotations.ts#L1-L48">angular2/annotations.ts (line 1)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/annotations.ts#L1-L51">angular2/annotations.ts (line 1)</a>
|
||||||
|
|
||||||
ul
|
ul
|
||||||
for page, slug in public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]._data
|
for page, slug in public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]._data
|
||||||
|
|
|
@ -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.34/modules/angular2/src/change_detection/pipes/pipe.ts#L58-L78">angular2/src/change_detection/pipes/pipe.ts (line 58)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Provides default implementation of `supports` and `onDestroy` method.
|
|
||||||
|
|
||||||
#Example
|
|
||||||
|
|
||||||
```
|
|
||||||
class DoublePipe extends BasePipe {
|
|
||||||
transform(value) {
|
|
||||||
return `${value}${value}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Annotations
|
|
||||||
.l-sub-section
|
|
||||||
h3.annotation CONST
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
@CONST()
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Members
|
|
||||||
.l-sub-section
|
|
||||||
h3 supports
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
supports(obj: any)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 onDestroy
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
onDestroy()
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 transform
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
transform(value: any, args: List<any>)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../change_detection'>angular2/change_detection</a>
|
exported from <a href='../change_detection'>angular2/change_detection</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/change_detection/interfaces.ts#L48-L65">angular2/src/change_detection/interfaces.ts (line 48)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/change_detection/interfaces.ts#L49-L67">angular2/src/change_detection/interfaces.ts (line 49)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
|
||||||
|
@ -32,6 +32,18 @@ p.location-badge.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3 ref
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
.l-sub-section
|
||||||
h3 addChild
|
h3 addChild
|
||||||
|
|
||||||
|
|
|
@ -1,53 +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.34/modules/angular2/src/change_detection/pipes/null_pipe.ts#L10-L27">angular2/src/change_detection/pipes/null_pipe.ts (line 10)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Members
|
|
||||||
.l-sub-section
|
|
||||||
h3 called
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 supports
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
supports(obj: any)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 transform
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
transform(value: any, args?: List<any>)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,51 +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.34/modules/angular2/src/change_detection/pipes/null_pipe.ts#L3-L10">angular2/src/change_detection/pipes/null_pipe.ts (line 3)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Annotations
|
|
||||||
.l-sub-section
|
|
||||||
h3.annotation CONST
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
@CONST()
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Members
|
|
||||||
.l-sub-section
|
|
||||||
h3 supports
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
supports(obj: any)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 create
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
create(cdRef: ChangeDetectorRef)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,75 +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.34/modules/angular2/src/change_detection/pipes/pipe.ts#L28-L58">angular2/src/change_detection/pipes/pipe.ts (line 28)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
An interface which all pipes must implement.
|
|
||||||
|
|
||||||
#Example
|
|
||||||
|
|
||||||
```
|
|
||||||
class DoublePipe implements Pipe {
|
|
||||||
supports(obj) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
onDestroy() {}
|
|
||||||
|
|
||||||
transform(value, args = []) {
|
|
||||||
return `${value}${value}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Members
|
|
||||||
.l-sub-section
|
|
||||||
h3 supports
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
supports(obj: any)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Query if a pipe supports a particular object instance.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 onDestroy
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
onDestroy()
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 transform
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
transform(value: any, args: List<any>)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,42 +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.34/modules/angular2/src/change_detection/pipes/pipe.ts#L78-L86">angular2/src/change_detection/pipes/pipe.ts (line 78)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Members
|
|
||||||
.l-sub-section
|
|
||||||
h3 supports
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
supports(obs: any)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 create
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
create(cdRef: ChangeDetectorRef)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
|
||||||
|
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.34/modules/angular2/src/change_detection/pipe_transform.ts#L16-L39">angular2/src/change_detection/pipe_transform.ts (line 16)</a>
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
An interface that stateful pipes should implement.
|
||||||
|
|
||||||
|
#Example
|
||||||
|
|
||||||
|
```
|
||||||
|
class StatefulPipe implements PipeTransform, PipeOnDestroy {
|
||||||
|
connection;
|
||||||
|
|
||||||
|
onDestroy() {
|
||||||
|
this.connection.release();
|
||||||
|
}
|
||||||
|
|
||||||
|
transform(value, args = []) {
|
||||||
|
this.connection = createConnection();
|
||||||
|
// ...
|
||||||
|
return someValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
.l-main-section
|
||||||
|
h2 Members
|
||||||
|
.l-sub-section
|
||||||
|
h3 onDestroy
|
||||||
|
|
||||||
|
|
||||||
|
pre.prettyprint
|
||||||
|
code.
|
||||||
|
onDestroy()
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
|
||||||
|
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.34/modules/angular2/src/change_detection/pipe_transform.ts#L1-L16">angular2/src/change_detection/pipe_transform.ts (line 1)</a>
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
An interface which all pipes must implement.
|
||||||
|
|
||||||
|
#Example
|
||||||
|
|
||||||
|
```
|
||||||
|
class DoublePipe implements PipeTransform {
|
||||||
|
transform(value, args = []) {
|
||||||
|
return `${value}${value}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
.l-main-section
|
||||||
|
h2 Members
|
||||||
|
.l-sub-section
|
||||||
|
h3 transform
|
||||||
|
|
||||||
|
|
||||||
|
pre.prettyprint
|
||||||
|
code.
|
||||||
|
transform(value: any, args: List<any>)
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,84 +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.34/modules/angular2/src/change_detection/pipes/pipes.ts#L6-L117">angular2/src/change_detection/pipes/pipes.ts (line 6)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.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(config: StringMap<string, PipeFactory[]>)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 config
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Map of <a href='Pipe-interface.html'><code>Pipe</code></a> names to <a href='PipeFactory-interface.html'><code>PipeFactory</code></a> lists used to configure the
|
|
||||||
<a href='Pipes-class.html'><code>Pipes</code></a> registry.
|
|
||||||
|
|
||||||
#Example
|
|
||||||
|
|
||||||
```
|
|
||||||
var pipesConfig = {
|
|
||||||
'json': [jsonPipeFactory]
|
|
||||||
}
|
|
||||||
@Component({
|
|
||||||
viewBindings: [
|
|
||||||
bind(Pipes).toValue(new Pipes(pipesConfig))
|
|
||||||
]
|
|
||||||
})
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 get
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
get(type: string, obj: any, cdRef?: ChangeDetectorRef, existingPipe?: Pipe)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,25 @@
|
||||||
|
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../change_detection'>angular2/change_detection</a>
|
exported from <a href='../change_detection'>angular2/change_detection</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/change_detection/pipes/pipe.ts#L2-L18">angular2/src/change_detection/pipes/pipe.ts (line 2)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/change_detection/change_detection_util.ts#L5-L33">angular2/src/change_detection/change_detection_util.ts (line 5)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Indicates that the result of a <a href='Pipe-interface.html'><code>Pipe</code></a> transformation has changed even though the reference
|
Indicates that the result of a <a href='../annotations/Pipe-var.html'><code>Pipe</code></a> transformation has changed even though the reference
|
||||||
has not changed.
|
has not changed.
|
||||||
|
|
||||||
The wrapped value will be unwrapped by change detection, and the unwrapped value will be stored.
|
The wrapped value will be unwrapped by change detection, and the unwrapped value will be stored.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```
|
||||||
|
if (this._latestValue === this._latestReturnedValue) {
|
||||||
|
return this._latestReturnedValue;
|
||||||
|
} else {
|
||||||
|
this._latestReturnedValue = this._latestValue;
|
||||||
|
return WrappedValue.wrap(this._latestValue); // this will force update
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
.l-main-section
|
||||||
h2 Members
|
h2 Members
|
||||||
|
|
|
@ -52,16 +52,12 @@
|
||||||
"title" : "WrappedValue Class"
|
"title" : "WrappedValue Class"
|
||||||
},
|
},
|
||||||
|
|
||||||
"defaultPipes-const" : {
|
"PipeTransform-interface" : {
|
||||||
"title" : "defaultPipes Const"
|
"title" : "PipeTransform Interface"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Pipe-interface" : {
|
"PipeOnDestroy-interface" : {
|
||||||
"title" : "Pipe Interface"
|
"title" : "PipeOnDestroy Interface"
|
||||||
},
|
|
||||||
|
|
||||||
"Pipes-class" : {
|
|
||||||
"title" : "Pipes Class"
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"IterableDiffers-class" : {
|
"IterableDiffers-class" : {
|
||||||
|
@ -86,21 +82,5 @@
|
||||||
|
|
||||||
"KeyValueDifferFactory-interface" : {
|
"KeyValueDifferFactory-interface" : {
|
||||||
"title" : "KeyValueDifferFactory Interface"
|
"title" : "KeyValueDifferFactory Interface"
|
||||||
},
|
|
||||||
|
|
||||||
"PipeFactory-interface" : {
|
|
||||||
"title" : "PipeFactory Interface"
|
|
||||||
},
|
|
||||||
|
|
||||||
"BasePipe-class" : {
|
|
||||||
"title" : "BasePipe Class"
|
|
||||||
},
|
|
||||||
|
|
||||||
"NullPipe-class" : {
|
|
||||||
"title" : "NullPipe Class"
|
|
||||||
},
|
|
||||||
|
|
||||||
"NullPipeFactory-class" : {
|
|
||||||
"title" : "NullPipeFactory Class"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,11 +0,0 @@
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 defaultPipes <span class="type">variable</span>
|
|
||||||
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.34/modules/angular2/src/change_detection/change_detection.ts#L129-L139">angular2/src/change_detection/change_detection.ts (line 129)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/change_detection.ts#L1-L37">angular2/change_detection.ts (line 1)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/change_detection.ts#L1-L32">angular2/change_detection.ts (line 1)</a>
|
||||||
|
|
||||||
ul
|
ul
|
||||||
for page, slug in public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]._data
|
for page, slug in public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]._data
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
.l-main-section
|
.l-main-section
|
||||||
h2 appComponentTypeToken <span class="type">variable</span>
|
h2 APP_COMPONENT <span class="type">variable</span>
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../core'>angular2/core</a>
|
exported from <a href='../core'>angular2/core</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/application_tokens.ts#L25-L25">angular2/src/core/application_tokens.ts (line 25)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/application_tokens.ts#L25-L25">angular2/src/core/application_tokens.ts (line 25)</a>
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../core'>angular2/core</a>
|
exported from <a href='../core'>angular2/core</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/application_common.ts#L337-L382">angular2/src/core/application_common.ts (line 337)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/application_common.ts#L338-L383">angular2/src/core/application_common.ts (line 338)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Represents a Angular's representation of an Application.
|
Represents a Angular's representation of an Application.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../core'>angular2/core</a>
|
exported from <a href='../core'>angular2/core</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/compiler/compiler.ts#L61-L350">angular2/src/core/compiler/compiler.ts (line 61)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/compiler/compiler.ts#L64-L355">angular2/src/core/compiler/compiler.ts (line 64)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
## URL Resolution
|
## URL Resolution
|
||||||
|
@ -42,7 +42,7 @@ p.location-badge.
|
||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
constructor(reader: DirectiveResolver, cache: CompilerCache, viewResolver: ViewResolver, componentUrlMapper: ComponentUrlMapper, urlResolver: UrlResolver, render:RenderCompiler, protoViewFactory: ProtoViewFactory, appUrl: AppRootUrl)
|
constructor(_directiveResolver: DirectiveResolver, _pipeResolver: PipeResolver, _defaultPipes: Type[], _compilerCache: CompilerCache, _viewResolver: ViewResolver, _componentUrlMapper: ComponentUrlMapper, _urlResolver: UrlResolver, _render:RenderCompiler, _protoViewFactory: ProtoViewFactory, appUrl: AppRootUrl)
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
|
||||||
|
|
|
@ -1,79 +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.34/modules/angular2/src/core/compiler/interface_query.ts#L1-L78">angular2/src/core/compiler/interface_query.ts (line 1)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
An iterable live list of components in the Light DOM.
|
|
||||||
|
|
||||||
Injectable Objects that contains a live list of child directives in the light DOM of a directive.
|
|
||||||
The directives are kept in depth-first pre-order traversal of the DOM.
|
|
||||||
|
|
||||||
The `QueryList` is iterable, therefore it can be used in both javascript code with `for..of` loop
|
|
||||||
as well as in
|
|
||||||
template with `*ng-for="of"` directive.
|
|
||||||
|
|
||||||
NOTE: In the future this class will implement an `Observable` interface. For now it uses a plain
|
|
||||||
list of observable
|
|
||||||
callbacks.
|
|
||||||
|
|
||||||
# Example:
|
|
||||||
|
|
||||||
Assume that `<tabs>` component would like to get a list its children which are `<pane>`
|
|
||||||
components as shown in this
|
|
||||||
example:
|
|
||||||
|
|
||||||
```html
|
|
||||||
<tabs>
|
|
||||||
<pane title="Overview">...</pane>
|
|
||||||
<pane *ng-for="#o of objects" [title]="o.title">{{o.text}}</pane>
|
|
||||||
</tabs>
|
|
||||||
```
|
|
||||||
|
|
||||||
In the above example the list of `<tabs>` elements needs to get a list of `<pane>` elements so
|
|
||||||
that it could render
|
|
||||||
tabs with the correct titles and in the correct order.
|
|
||||||
|
|
||||||
A possible solution would be for a `<pane>` to inject `<tabs>` component and then register itself
|
|
||||||
with `<tabs>`
|
|
||||||
component's on `hydrate` and deregister on `dehydrate` event. While a reasonable approach, this
|
|
||||||
would only work
|
|
||||||
partialy since `*ng-for` could rearrange the list of `<pane>` components which would not be
|
|
||||||
reported to `<tabs>`
|
|
||||||
component and thus the list of `<pane>` components would be out of sync with respect to the list
|
|
||||||
of `<pane>` elements.
|
|
||||||
|
|
||||||
A preferred solution is to inject a `QueryList` which is a live list of directives in the
|
|
||||||
component`s light DOM.
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
@Component({
|
|
||||||
selector: 'tabs'
|
|
||||||
})
|
|
||||||
@View({
|
|
||||||
template: `
|
|
||||||
<ul>
|
|
||||||
<li *ng-for="#pane of panes">{{pane.title}}</li>
|
|
||||||
</ul>
|
|
||||||
<content></content>
|
|
||||||
`
|
|
||||||
})
|
|
||||||
class Tabs {
|
|
||||||
panes: QueryList<Pane>
|
|
||||||
|
|
||||||
constructor(@Query(Pane) panes:QueryList<Pane>) {
|
|
||||||
this.panes = panes;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'pane',
|
|
||||||
properties: ['title']
|
|
||||||
})
|
|
||||||
@View(...)
|
|
||||||
class Pane {
|
|
||||||
title:string;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,78 @@
|
||||||
|
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../core'>angular2/core</a>
|
exported from <a href='../core'>angular2/core</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/compiler/query_list.ts#L2-L44">angular2/src/core/compiler/query_list.ts (line 2)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/compiler/query_list.ts#L1-L107">angular2/src/core/compiler/query_list.ts (line 1)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Injectable Objects that contains a live list of child directives in the light Dom of a directive.
|
An iterable and observable live list of components in the DOM.
|
||||||
|
|
||||||
|
A QueryList contains a live list of child directives in the DOM of a directive.
|
||||||
The directives are kept in depth-first pre-order traversal of the DOM.
|
The directives are kept in depth-first pre-order traversal of the DOM.
|
||||||
|
|
||||||
In the future this class will implement an Observable interface.
|
The `QueryList` is iterable, therefore it can be used in both javascript code with `for..of` loop
|
||||||
For now it uses a plain list of observable callbacks.
|
as well as in template with `*ng-for="of"` directive.
|
||||||
|
|
||||||
|
QueryList is updated as part of the change-detection cycle of a directive. Since change detection
|
||||||
|
happens after construction of a directive, QueryList will always be empty when observed in the
|
||||||
|
constructor.
|
||||||
|
|
||||||
|
|
||||||
|
NOTE: In the future this class will implement an `Observable` interface. For now it uses a plain
|
||||||
|
list of observable callbacks.
|
||||||
|
|
||||||
|
# Example:
|
||||||
|
|
||||||
|
Assume that `<tabs>` component would like to get a list its children which are `<pane>`
|
||||||
|
components as shown in this example:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<tabs>
|
||||||
|
<pane title="Overview">...</pane>
|
||||||
|
<pane *ng-for="#o of objects" [title]="o.title">{{o.text}}</pane>
|
||||||
|
</tabs>
|
||||||
|
```
|
||||||
|
|
||||||
|
In the above example the list of `<tabs>` elements needs to get a list of `<pane>` elements so
|
||||||
|
that it could render tabs with the correct titles and in the correct order.
|
||||||
|
|
||||||
|
A possible solution would be for a `<pane>` to inject `<tabs>` component and then register itself
|
||||||
|
with `<tabs>` component's on `hydrate` and deregister on `dehydrate` event. While a reasonable
|
||||||
|
approach, this would only work partialy since `*ng-for` could rearrange the list of `<pane>`
|
||||||
|
components which would not be reported to `<tabs>` component and thus the list of `<pane>`
|
||||||
|
components would be out of sync with respect to the list of `<pane>` elements.
|
||||||
|
|
||||||
|
A preferred solution is to inject a `QueryList` which is a live list of directives in the
|
||||||
|
component`s light DOM.
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
@Component({
|
||||||
|
selector: 'tabs'
|
||||||
|
})
|
||||||
|
@View({
|
||||||
|
template: `
|
||||||
|
<ul>
|
||||||
|
<li *ng-for="#pane of panes">{{pane.title}}</li>
|
||||||
|
</ul>
|
||||||
|
<content></content>
|
||||||
|
`
|
||||||
|
})
|
||||||
|
class Tabs {
|
||||||
|
panes: QueryList<Pane>
|
||||||
|
|
||||||
|
constructor(@Query(Pane) panes:QueryList<Pane>) {
|
||||||
|
this.panes = panes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'pane',
|
||||||
|
properties: ['title']
|
||||||
|
})
|
||||||
|
@View(...)
|
||||||
|
class Pane {
|
||||||
|
title:string;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
.l-main-section
|
||||||
|
|
|
@ -1,40 +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.34/modules/angular2/src/render/api.ts#L377-L395">angular2/src/render/api.ts (line 377)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Abstract reference to the element which can be marshaled across web-worker boundary.
|
|
||||||
|
|
||||||
This interface is used by the Renderer API.
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Members
|
|
||||||
.l-sub-section
|
|
||||||
h3 renderView
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Reference to the `RenderViewRef` where the `RenderElementRef` is inside of.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 renderBoundElementIndex
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Index of the element inside the `RenderViewRef`.
|
|
||||||
|
|
||||||
This is used internally by the Angular framework to locate elements.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
"intro" : "Define angular core API here."
|
"intro" : "Define angular core API here."
|
||||||
},
|
},
|
||||||
|
|
||||||
"appComponentTypeToken-const" : {
|
"APP_COMPONENT-const" : {
|
||||||
"title" : "appComponentTypeToken Const"
|
"title" : "APP_COMPONENT Const"
|
||||||
},
|
},
|
||||||
|
|
||||||
"ApplicationRef-class" : {
|
"ApplicationRef-class" : {
|
||||||
|
@ -40,10 +40,6 @@
|
||||||
"title" : "AppViewManager Class"
|
"title" : "AppViewManager Class"
|
||||||
},
|
},
|
||||||
|
|
||||||
"IQueryList-interface" : {
|
|
||||||
"title" : "IQueryList Interface"
|
|
||||||
},
|
|
||||||
|
|
||||||
"QueryList-class" : {
|
"QueryList-class" : {
|
||||||
"title" : "QueryList Class"
|
"title" : "QueryList Class"
|
||||||
},
|
},
|
||||||
|
@ -64,10 +60,6 @@
|
||||||
"title" : "TemplateRef Class"
|
"title" : "TemplateRef Class"
|
||||||
},
|
},
|
||||||
|
|
||||||
"RenderElementRef-interface" : {
|
|
||||||
"title" : "RenderElementRef Interface"
|
|
||||||
},
|
|
||||||
|
|
||||||
"ViewRef-class" : {
|
"ViewRef-class" : {
|
||||||
"title" : "ViewRef Class"
|
"title" : "ViewRef Class"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/core.ts#L1-L33">angular2/core.ts (line 1)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/core.ts#L1-L31">angular2/core.ts (line 1)</a>
|
||||||
|
|
||||||
ul
|
ul
|
||||||
for page, slug in public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]._data
|
for page, slug in public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]._data
|
||||||
|
|
|
@ -4,7 +4,7 @@ p.location-badge.
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/di/binding.ts#L36-L217">angular2/src/di/binding.ts (line 36)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/di/binding.ts#L36-L217">angular2/src/di/binding.ts (line 36)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Describes how the <a href='Injector-class.html'><code>Injector</code></a> should instantiate a given token.
|
Describes how_ the <a href='Injector-class.html'><code>Injector</code></a> should instantiate a given token.
|
||||||
|
|
||||||
See <a href='bind-function.html'><code>bind</code></a>.
|
See <a href='bind-function.html'><code>bind</code></a>.
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../di'>angular2/di</a>
|
exported from <a href='../di'>angular2/di</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/di/injector.ts#L352-L358">angular2/src/di/injector.ts (line 352)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/di/injector.ts#L360-L366">angular2/src/di/injector.ts (line 360)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ p.location-badge.
|
||||||
|
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
constructor(binding: ResolvedBinding, visibility: number)
|
constructor(binding: ResolvedBinding, visibility: Visibility)
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../di'>angular2/di</a>
|
exported from <a href='../di'>angular2/di</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/di/injector.ts#L358-L365">angular2/src/di/injector.ts (line 358)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/di/injector.ts#L366-L373">angular2/src/di/injector.ts (line 366)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Used to provide dependencies that cannot be easily expressed as bindings.
|
Used to provide dependencies that cannot be easily expressed as bindings.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../di'>angular2/di</a>
|
exported from <a href='../di'>angular2/di</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/di/injector.ts#L365-L768">angular2/src/di/injector.ts (line 365)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/di/injector.ts#L373-L799">angular2/src/di/injector.ts (line 373)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
A dependency injection container used for resolving dependencies.
|
A dependency injection container used for resolving dependencies.
|
||||||
|
@ -190,6 +190,38 @@ p.location-badge.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.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
|
.l-sub-section
|
||||||
h3 displayName
|
h3 displayName
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 PRIVATE <span class="type">variable</span>
|
|
||||||
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.34/modules/angular2/src/di/injector.ts#L22-L22">angular2/src/di/injector.ts (line 22)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 PUBLIC <span class="type">variable</span>
|
|
||||||
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.34/modules/angular2/src/di/injector.ts#L21-L21">angular2/src/di/injector.ts (line 21)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 PUBLIC_AND_PRIVATE <span class="type">variable</span>
|
|
||||||
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.34/modules/angular2/src/di/injector.ts#L23-L23">angular2/src/di/injector.ts (line 23)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../di'>angular2/di</a>
|
exported from <a href='../di'>angular2/di</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/di/injector.ts#L167-L181">angular2/src/di/injector.ts (line 167)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/di/injector.ts#L175-L189">angular2/src/di/injector.ts (line 175)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
.l-main-section
|
.l-main-section
|
||||||
h2 undefinedValue <span class="type">variable</span>
|
h2 UNDEFINED <span class="type">variable</span>
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../di'>angular2/di</a>
|
exported from <a href='../di'>angular2/di</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/di/injector.ts#L19-L19">angular2/src/di/injector.ts (line 19)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/di/injector.ts#L19-L19">angular2/src/di/injector.ts (line 19)</a>
|
|
@ -0,0 +1,45 @@
|
||||||
|
|
||||||
|
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.34/modules/angular2/src/di/injector.ts#L19-L25">angular2/src/di/injector.ts (line 19)</a>
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
.l-main-section
|
||||||
|
h2 Members
|
||||||
|
.l-sub-section
|
||||||
|
h3 Public
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3 Private
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3 PublicAndPrivate
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -60,20 +60,12 @@
|
||||||
"title" : "DependencyProvider Interface"
|
"title" : "DependencyProvider Interface"
|
||||||
},
|
},
|
||||||
|
|
||||||
"PUBLIC_AND_PRIVATE-const" : {
|
"Visibility-enum" : {
|
||||||
"title" : "PUBLIC_AND_PRIVATE Const"
|
"title" : "Visibility Enum"
|
||||||
},
|
},
|
||||||
|
|
||||||
"PUBLIC-const" : {
|
"UNDEFINED-const" : {
|
||||||
"title" : "PUBLIC Const"
|
"title" : "UNDEFINED Const"
|
||||||
},
|
|
||||||
|
|
||||||
"PRIVATE-const" : {
|
|
||||||
"title" : "PRIVATE Const"
|
|
||||||
},
|
|
||||||
|
|
||||||
"undefinedValue-const" : {
|
|
||||||
"title" : "undefinedValue Const"
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"Binding-class" : {
|
"Binding-class" : {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/di.ts#L1-L43">angular2/di.ts (line 1)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/di.ts#L1-L41">angular2/di.ts (line 1)</a>
|
||||||
|
|
||||||
ul
|
ul
|
||||||
for page, slug in public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]._data
|
for page, slug in public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]._data
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
|
|
||||||
.l-main-section
|
.l-main-section
|
||||||
h2 coreDirectives <span class="type">variable</span>
|
h2 CORE_DIRECTIVES <span class="type">variable</span>
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../directives'>angular2/directives</a>
|
exported from <a href='../directives'>angular2/directives</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/directives.ts#L62-L63">angular2/directives.ts (line 62)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/directives.ts#L63-L64">angular2/directives.ts (line 63)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
A collection of the Angular core directives that are likely to be used in each and every Angular
|
A collection of the Angular core directives that are likely to be used in each and every Angular
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../directives'>angular2/directives</a>
|
exported from <a href='../directives'>angular2/directives</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/directives/class.ts#L11-L110">angular2/src/directives/class.ts (line 11)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/directives/ng_class.ts#L11-L130">angular2/src/directives/ng_class.ts (line 11)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Adds and removes CSS classes based on an {expression} value.
|
Adds and removes CSS classes based on an {expression} value.
|
||||||
|
@ -18,7 +18,7 @@ p.location-badge.
|
||||||
# Example:
|
# Example:
|
||||||
|
|
||||||
```
|
```
|
||||||
<div class="message" [class]="{error: errorCount > 0}">
|
<div class="message" [ng-class]="{error: errorCount > 0}">
|
||||||
Please check errors.
|
Please check errors.
|
||||||
</div>
|
</div>
|
||||||
```
|
```
|
||||||
|
@ -32,9 +32,9 @@ p.location-badge.
|
||||||
pre.prettyprint
|
pre.prettyprint
|
||||||
code.
|
code.
|
||||||
@Directive({
|
@Directive({
|
||||||
selector: '[class]',
|
selector: '[ng-class]',
|
||||||
lifecycle: [LifecycleEvent.onCheck, LifecycleEvent.onDestroy],
|
lifecycle: [LifecycleEvent.onCheck, LifecycleEvent.onDestroy],
|
||||||
properties: ['rawClass: class']
|
properties: ['rawClass: ng-class', 'initialClasses: class']
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@ -55,6 +55,18 @@ p.location-badge.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3 initialClasses
|
||||||
|
|
||||||
|
|
||||||
|
:markdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
.l-sub-section
|
||||||
h3 rawClass
|
h3 rawClass
|
||||||
|
|
|
@ -13,7 +13,7 @@ p.location-badge.
|
||||||
|
|
||||||
```
|
```
|
||||||
<div>Normal: {{1 + 2}}</div> // output "Normal: 3"
|
<div>Normal: {{1 + 2}}</div> // output "Normal: 3"
|
||||||
<div non-bindable>Ignored: {{1 + 2}}</div> // output "Ignored: {{1 + 2}}"
|
<div ng-non-bindable>Ignored: {{1 + 2}}</div> // output "Ignored: {{1 + 2}}"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
"intro" : "Common directives shipped with Angular."
|
"intro" : "Common directives shipped with Angular."
|
||||||
},
|
},
|
||||||
|
|
||||||
"coreDirectives-const" : {
|
"CORE_DIRECTIVES-const" : {
|
||||||
"title" : "coreDirectives Const"
|
"title" : "CORE_DIRECTIVES Const"
|
||||||
},
|
},
|
||||||
|
|
||||||
"CSSClass-class" : {
|
"NgClass-class" : {
|
||||||
"title" : "CSSClass Class"
|
"title" : "NgClass Class"
|
||||||
},
|
},
|
||||||
|
|
||||||
"NgFor-class" : {
|
"NgFor-class" : {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/directives.ts#L1-L64">angular2/directives.ts (line 1)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/directives.ts#L1-L65">angular2/directives.ts (line 1)</a>
|
||||||
|
|
||||||
ul
|
ul
|
||||||
for page, slug in public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]._data
|
for page, slug in public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]._data
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
.l-main-section
|
.l-main-section
|
||||||
h2 formInjectables <span class="type">variable</span>
|
h2 FORM_BINDINGS <span class="type">variable</span>
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../forms'>angular2/forms</a>
|
exported from <a href='../forms'>angular2/forms</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/forms.ts#L42-L42">angular2/forms.ts (line 42)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/forms.ts#L42-L42">angular2/forms.ts (line 42)</a>
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
.l-main-section
|
.l-main-section
|
||||||
h2 formDirectives <span class="type">variable</span>
|
h2 FORM_DIRECTIVES <span class="type">variable</span>
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../forms'>angular2/forms</a>
|
exported from <a href='../forms'>angular2/forms</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/forms/directives.ts#L38-L53">angular2/src/forms/directives.ts (line 38)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/forms/directives.ts#L38-L53">angular2/src/forms/directives.ts (line 38)</a>
|
|
@ -10,7 +10,7 @@ p.location-badge.
|
||||||
|
|
||||||
```
|
```
|
||||||
import {Component, View, bootstrap} from 'angular2/angular2';
|
import {Component, View, bootstrap} from 'angular2/angular2';
|
||||||
import {FormBuilder, Validators, formDirectives, ControlGroup} from 'angular2/forms';
|
import {FormBuilder, Validators, FORM_DIRECTIVES, ControlGroup} from 'angular2/forms';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'login-comp',
|
selector: 'login-comp',
|
||||||
|
@ -30,7 +30,7 @@ p.location-badge.
|
||||||
</form>
|
</form>
|
||||||
`,
|
`,
|
||||||
directives: [
|
directives: [
|
||||||
formDirectives
|
FORM_DIRECTIVES
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
class LoginComp {
|
class LoginComp {
|
||||||
|
|
|
@ -16,7 +16,7 @@ p.location-badge.
|
||||||
```
|
```
|
||||||
@Component({selector: "signup-comp"})
|
@Component({selector: "signup-comp"})
|
||||||
@View({
|
@View({
|
||||||
directives: [formDirectives],
|
directives: [FORM_DIRECTIVES],
|
||||||
template: `
|
template: `
|
||||||
<form #f="form" (submit)='onSignUp(f.value)'>
|
<form #f="form" (submit)='onSignUp(f.value)'>
|
||||||
<div ng-control-group='credentials' #credentials="form">
|
<div ng-control-group='credentials' #credentials="form">
|
||||||
|
|
|
@ -17,7 +17,7 @@ p.location-badge.
|
||||||
```
|
```
|
||||||
@Component({selector: "login-comp"})
|
@Component({selector: "login-comp"})
|
||||||
@View({
|
@View({
|
||||||
directives: [formDirectives],
|
directives: [FORM_DIRECTIVES],
|
||||||
template: `
|
template: `
|
||||||
<form #f="form" (submit)='onLogIn(f.value)'>
|
<form #f="form" (submit)='onLogIn(f.value)'>
|
||||||
Login <input type='text' ng-control='login' #l="form">
|
Login <input type='text' ng-control='login' #l="form">
|
||||||
|
@ -40,7 +40,7 @@ p.location-badge.
|
||||||
```
|
```
|
||||||
@Component({selector: "login-comp"})
|
@Component({selector: "login-comp"})
|
||||||
@View({
|
@View({
|
||||||
directives: [formDirectives],
|
directives: [FORM_DIRECTIVES],
|
||||||
template: `
|
template: `
|
||||||
<form (submit)='onLogIn()'>
|
<form (submit)='onLogIn()'>
|
||||||
Login <input type='text' ng-control='login' [(ng-model)]="credentials.login">
|
Login <input type='text' ng-control='login' [(ng-model)]="credentials.login">
|
||||||
|
|
|
@ -11,7 +11,7 @@ p.location-badge.
|
||||||
```
|
```
|
||||||
@Component({selector: "signup-comp"})
|
@Component({selector: "signup-comp"})
|
||||||
@View({
|
@View({
|
||||||
directives: [formDirectives],
|
directives: [FORM_DIRECTIVES],
|
||||||
template: `
|
template: `
|
||||||
<form #f="form" (submit)='onSignUp(f.value)'>
|
<form #f="form" (submit)='onSignUp(f.value)'>
|
||||||
<div ng-control-group='credentials' #credentials="form">
|
<div ng-control-group='credentials' #credentials="form">
|
||||||
|
|
|
@ -17,7 +17,7 @@ p.location-badge.
|
||||||
```
|
```
|
||||||
@Component({selector: "login-comp"})
|
@Component({selector: "login-comp"})
|
||||||
@View({
|
@View({
|
||||||
directives: [formDirectives],
|
directives: [FORM_DIRECTIVES],
|
||||||
template: "<input type='text' [ng-form-control]='loginControl'>"
|
template: "<input type='text' [ng-form-control]='loginControl'>"
|
||||||
})
|
})
|
||||||
class LoginComp {
|
class LoginComp {
|
||||||
|
@ -35,7 +35,7 @@ p.location-badge.
|
||||||
```
|
```
|
||||||
@Component({selector: "login-comp"})
|
@Component({selector: "login-comp"})
|
||||||
@View({
|
@View({
|
||||||
directives: [formDirectives],
|
directives: [FORM_DIRECTIVES],
|
||||||
template: "<input type='text' [ng-form-control]='loginControl' [(ng-model)]='login'>"
|
template: "<input type='text' [ng-form-control]='loginControl' [(ng-model)]='login'>"
|
||||||
})
|
})
|
||||||
class LoginComp {
|
class LoginComp {
|
||||||
|
|
|
@ -15,7 +15,7 @@ p.location-badge.
|
||||||
```
|
```
|
||||||
@Component({selector: "login-comp"})
|
@Component({selector: "login-comp"})
|
||||||
@View({
|
@View({
|
||||||
directives: [formDirectives],
|
directives: [FORM_DIRECTIVES],
|
||||||
template: "<form [ng-form-model]='loginForm'>" +
|
template: "<form [ng-form-model]='loginForm'>" +
|
||||||
"Login <input type='text' ng-control='login'>" +
|
"Login <input type='text' ng-control='login'>" +
|
||||||
"Password <input type='password' ng-control='password'>" +
|
"Password <input type='password' ng-control='password'>" +
|
||||||
|
@ -44,7 +44,7 @@ p.location-badge.
|
||||||
```
|
```
|
||||||
@Component({selector: "login-comp"})
|
@Component({selector: "login-comp"})
|
||||||
@View({
|
@View({
|
||||||
directives: [formDirectives],
|
directives: [FORM_DIRECTIVES],
|
||||||
template: "<form [ng-form-model]='loginForm'>" +
|
template: "<form [ng-form-model]='loginForm'>" +
|
||||||
"Login <input type='text' ng-control='login' [(ng-model)]='login'>" +
|
"Login <input type='text' ng-control='login' [(ng-model)]='login'>" +
|
||||||
"Password <input type='password' ng-control='password' [(ng-model)]='password'>" +
|
"Password <input type='password' ng-control='password' [(ng-model)]='password'>" +
|
||||||
|
|
|
@ -10,7 +10,7 @@ p.location-badge.
|
||||||
```
|
```
|
||||||
@Component({selector: "search-comp"})
|
@Component({selector: "search-comp"})
|
||||||
@View({
|
@View({
|
||||||
directives: [formDirectives],
|
directives: [FORM_DIRECTIVES],
|
||||||
template: `
|
template: `
|
||||||
<input type='text' [(ng-model)]="searchQuery">
|
<input type='text' [(ng-model)]="searchQuery">
|
||||||
`})
|
`})
|
||||||
|
|
|
@ -80,8 +80,8 @@
|
||||||
"title" : "SelectControlValueAccessor Class"
|
"title" : "SelectControlValueAccessor Class"
|
||||||
},
|
},
|
||||||
|
|
||||||
"formDirectives-const" : {
|
"FORM_DIRECTIVES-const" : {
|
||||||
"title" : "formDirectives Const"
|
"title" : "FORM_DIRECTIVES Const"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Validators-class" : {
|
"Validators-class" : {
|
||||||
|
@ -100,7 +100,7 @@
|
||||||
"title" : "FormBuilder Class"
|
"title" : "FormBuilder Class"
|
||||||
},
|
},
|
||||||
|
|
||||||
"formInjectables-const" : {
|
"FORM_BINDINGS-const" : {
|
||||||
"title" : "formInjectables Const"
|
"title" : "FORM_BINDINGS Const"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,50 +0,0 @@
|
||||||
|
|
||||||
p.location-badge.
|
|
||||||
exported from <a href='../http'>angular2/http</a>
|
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/http/base_request_options.ts#L62-L87">angular2/src/http/base_request_options.ts (line 62)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Injectable version of <a href='RequestOptions-class.html'><code>RequestOptions</code></a>, with overridable default values.
|
|
||||||
|
|
||||||
#Example
|
|
||||||
|
|
||||||
```
|
|
||||||
import {Http, BaseRequestOptions, Request} from 'angular2/http';
|
|
||||||
...
|
|
||||||
class MyComponent {
|
|
||||||
constructor(baseRequestOptions:BaseRequestOptions, http:Http) {
|
|
||||||
var options = baseRequestOptions.merge({body: 'foobar', url: 'https://foo'});
|
|
||||||
var request = new Request(options);
|
|
||||||
http.request(request).subscribe(res => this.bars = res.json());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.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()
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,62 +0,0 @@
|
||||||
|
|
||||||
p.location-badge.
|
|
||||||
exported from <a href='../http'>angular2/http</a>
|
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/http/interfaces.ts#L25-L35">angular2/src/http/interfaces.ts (line 25)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Abstract class from which real connections are derived.
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Members
|
|
||||||
.l-sub-section
|
|
||||||
h3 readyState
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 request
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 response
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 dispose
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
dispose()
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,44 +0,0 @@
|
||||||
|
|
||||||
p.location-badge.
|
|
||||||
exported from <a href='../http'>angular2/http</a>
|
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/http/interfaces.ts#L14-L25">angular2/src/http/interfaces.ts (line 14)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Abstract class from which real backends are derived.
|
|
||||||
|
|
||||||
The primary purpose of a `ConnectionBackend` is to create new connections to fulfill a given
|
|
||||||
<a href='Request-class.html'><code>Request</code></a>.
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Members
|
|
||||||
.l-sub-section
|
|
||||||
h3 constructor
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
constructor()
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 createConnection
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
createConnection(request: any)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,196 +0,0 @@
|
||||||
|
|
||||||
p.location-badge.
|
|
||||||
exported from <a href='../http'>angular2/http</a>
|
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/http/headers.ts#L16-L110">angular2/src/http/headers.ts (line 16)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Polyfill for [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers/Headers), as
|
|
||||||
specified in the [Fetch Spec](https://fetch.spec.whatwg.org/#headers-class). The only known
|
|
||||||
difference from the spec is the lack of an `entries` method.
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Members
|
|
||||||
.l-sub-section
|
|
||||||
h3 constructor
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
constructor(headers?: Headers | StringMap<string, any>)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 append
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
append(name: string, value: string)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Appends a header to existing list of header values for a given header name.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 delete
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
delete(name: string)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Deletes all header values for the given name.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 forEach
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
forEach(fn: Function)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 get
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
get(header: string)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Returns first header that matches given name.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 has
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
has(header: string)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Check for existence of header by given name.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 keys
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
keys()
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Provides names of set headers
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 set
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
set(header: string, value: string | List<string>)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Sets or overrides header value for given name.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 values
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
values()
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Returns values of all headers.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 getAll
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
getAll(header: string)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Returns list of header values for a given name.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 entries
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
entries()
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
This method is not implemented.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,222 +0,0 @@
|
||||||
|
|
||||||
p.location-badge.
|
|
||||||
exported from <a href='../http'>angular2/http</a>
|
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/http/http.ts#L32-L178">angular2/src/http/http.ts (line 32)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Performs http requests using `XMLHttpRequest` as the default backend.
|
|
||||||
|
|
||||||
`Http` is available as an injectable class, with methods to perform http requests. Calling
|
|
||||||
`request` returns an <a href='../core/EventEmitter-class.html'><code>EventEmitter</code></a> which will emit a single <a href='Response-class.html'><code>Response</code></a> when a
|
|
||||||
response is received.
|
|
||||||
|
|
||||||
|
|
||||||
## Breaking Change
|
|
||||||
|
|
||||||
Previously, methods of `Http` would return an RxJS Observable directly. For now,
|
|
||||||
the `toRx()` method of <a href='../core/EventEmitter-class.html'><code>EventEmitter</code></a> needs to be called in order to get the RxJS
|
|
||||||
Subject. `EventEmitter` does not provide combinators like `map`, and has different semantics for
|
|
||||||
subscribing/observing. This is temporary; the result of all `Http` method calls will be either an
|
|
||||||
Observable
|
|
||||||
or Dart Stream when [issue #2794](https://github.com/angular/angular/issues/2794) is resolved.
|
|
||||||
|
|
||||||
#Example
|
|
||||||
|
|
||||||
```
|
|
||||||
import {Http, httpInjectables} from 'angular2/http';
|
|
||||||
@Component({selector: 'http-app', viewBindings: [httpInjectables]})
|
|
||||||
@View({templateUrl: 'people.html'})
|
|
||||||
class PeopleComponent {
|
|
||||||
constructor(http: Http) {
|
|
||||||
http.get('people.json')
|
|
||||||
//Get the RxJS Subject
|
|
||||||
.toRx()
|
|
||||||
// Call map on the response observable to get the parsed people object
|
|
||||||
.map(res => res.json())
|
|
||||||
// Subscribe to the observable to get the parsed people object and attach it to the
|
|
||||||
// component
|
|
||||||
.subscribe(people => this.people = people);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
To use the <a href='../core/EventEmitter-class.html'><code>EventEmitter</code></a> returned by `Http`, simply pass a generator (See "interface
|
|
||||||
Generator" in the Async Generator spec: https://github.com/jhusain/asyncgenerator) to the
|
|
||||||
`observer` method of the returned emitter, with optional methods of `next`, `throw`, and `return`.
|
|
||||||
|
|
||||||
#Example
|
|
||||||
|
|
||||||
```
|
|
||||||
http.get('people.json').observer({next: (value) => this.people = people});
|
|
||||||
```
|
|
||||||
|
|
||||||
The default construct used to perform requests, `XMLHttpRequest`, is abstracted as a "Backend" (
|
|
||||||
<a href='XHRBackend-class.html'><code>XHRBackend</code></a> in this case), which could be mocked with dependency injection by replacing
|
|
||||||
the <a href='XHRBackend-class.html'><code>XHRBackend</code></a> binding, as in the following example:
|
|
||||||
|
|
||||||
#Example
|
|
||||||
|
|
||||||
```
|
|
||||||
import {MockBackend, BaseRequestOptions, Http} from 'angular2/http';
|
|
||||||
var injector = Injector.resolveAndCreate([
|
|
||||||
BaseRequestOptions,
|
|
||||||
MockBackend,
|
|
||||||
bind(Http).toFactory(
|
|
||||||
function(backend, defaultOptions) {
|
|
||||||
return new Http(backend, defaultOptions);
|
|
||||||
},
|
|
||||||
[MockBackend, BaseRequestOptions])
|
|
||||||
]);
|
|
||||||
var http = injector.get(Http);
|
|
||||||
http.get('request-from-mock-backend.json').toRx().subscribe((res:Response) => doSomething(res));
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.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(_backend: ConnectionBackend, _defaultOptions: RequestOptions)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 request
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
request(url: string | Request, options?: IRequestOptions)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Performs any type of http request. First argument is required, and can either be a url or
|
|
||||||
a <a href='Request-class.html'><code>Request</code></a> instance. If the first argument is a url, an optional <a href='RequestOptions-class.html'><code>RequestOptions</code></a>
|
|
||||||
object can be provided as the 2nd argument. The options object will be merged with the values
|
|
||||||
of <a href='BaseRequestOptions-class.html'><code>BaseRequestOptions</code></a> before performing the request.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 get
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
get(url: string, options?: IRequestOptions)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Performs a request with `get` http method.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 post
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
post(url: string, body: string, options?: IRequestOptions)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Performs a request with `post` http method.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 put
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
put(url: string, body: string, options?: IRequestOptions)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Performs a request with `put` http method.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 delete
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
delete(url: string, options?: IRequestOptions)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Performs a request with `delete` http method.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 patch
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
patch(url: string, body: string, options?: IRequestOptions)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Performs a request with `patch` http method.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 head
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
head(url: string, options?: IRequestOptions)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Performs a request with `head` http method.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,95 +0,0 @@
|
||||||
|
|
||||||
p.location-badge.
|
|
||||||
exported from <a href='../http'>angular2/http</a>
|
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/http/interfaces.ts#L35-L50">angular2/src/http/interfaces.ts (line 35)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Interface for options to construct a Request, based on
|
|
||||||
[RequestInit](https://fetch.spec.whatwg.org/#requestinit) from the Fetch spec.
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Members
|
|
||||||
.l-sub-section
|
|
||||||
h3 url?
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 method?
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 headers?
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 body?
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 mode?
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 credentials?
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 cache?
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,83 +0,0 @@
|
||||||
|
|
||||||
p.location-badge.
|
|
||||||
exported from <a href='../http'>angular2/http</a>
|
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/http/interfaces.ts#L50-L64">angular2/src/http/interfaces.ts (line 50)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Interface for options to construct a Response, based on
|
|
||||||
[ResponseInit](https://fetch.spec.whatwg.org/#responseinit) from the Fetch spec.
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Members
|
|
||||||
.l-sub-section
|
|
||||||
h3 body?
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 status?
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 statusText?
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 headers?
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 type?
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 url?
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,50 +0,0 @@
|
||||||
|
|
||||||
p.location-badge.
|
|
||||||
exported from <a href='../http'>angular2/http</a>
|
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/http/backends/jsonp_backend.ts#L89-L97">angular2/src/http/backends/jsonp_backend.ts (line 89)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.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(_browserJSONP: BrowserJsonp, _baseResponseOptions: ResponseOptions)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 createConnection
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
createConnection(request: Request)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,54 +0,0 @@
|
||||||
|
|
||||||
p.location-badge.
|
|
||||||
exported from <a href='../http'>angular2/http</a>
|
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/http/http.ts#L178-L205">angular2/src/http/http.ts (line 178)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.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(backend: ConnectionBackend, defaultOptions: RequestOptions)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 request
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
request(url: string | Request, options?: IRequestOptions)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Performs any type of http request. First argument is required, and can either be a url or
|
|
||||||
a <a href='Request-class.html'><code>Request</code></a> instance. If the first argument is a url, an optional <a href='RequestOptions-class.html'><code>RequestOptions</code></a>
|
|
||||||
object can be provided as the 2nd argument. The options object will be merged with the values
|
|
||||||
of <a href='BaseRequestOptions-class.html'><code>BaseRequestOptions</code></a> before performing the request.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,205 +0,0 @@
|
||||||
|
|
||||||
p.location-badge.
|
|
||||||
exported from <a href='../http'>angular2/http</a>
|
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/http/backends/mock_backend.ts#L99-L228">angular2/src/http/backends/mock_backend.ts (line 99)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
A mock backend for testing the <a href='Http-class.html'><code>Http</code></a> service.
|
|
||||||
|
|
||||||
This class can be injected in tests, and should be used to override bindings
|
|
||||||
to other backends, such as <a href='XHRBackend-class.html'><code>XHRBackend</code></a>.
|
|
||||||
|
|
||||||
#Example
|
|
||||||
|
|
||||||
```
|
|
||||||
import {MockBackend, DefaultOptions, Http} from 'angular2/http';
|
|
||||||
it('should get some data', inject([AsyncTestCompleter], (async) => {
|
|
||||||
var connection;
|
|
||||||
var injector = Injector.resolveAndCreate([
|
|
||||||
MockBackend,
|
|
||||||
bind(Http).toFactory((backend, defaultOptions) => {
|
|
||||||
return new Http(backend, defaultOptions)
|
|
||||||
}, [MockBackend, DefaultOptions])]);
|
|
||||||
var http = injector.get(Http);
|
|
||||||
var backend = injector.get(MockBackend);
|
|
||||||
//Assign any newly-created connection to local variable
|
|
||||||
backend.connections.subscribe(c => connection = c);
|
|
||||||
http.request('data.json').subscribe((res) => {
|
|
||||||
expect(res.text()).toBe('awesome');
|
|
||||||
async.done();
|
|
||||||
});
|
|
||||||
connection.mockRespond(new Response('awesome'));
|
|
||||||
}));
|
|
||||||
```
|
|
||||||
|
|
||||||
This method only exists in the mock implementation, not in real Backends.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Annotations
|
|
||||||
.l-sub-section
|
|
||||||
h3.annotation Injectable
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
@Injectable()
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3.annotation IMPLEMENTS
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
@IMPLEMENTS(ConnectionBackend)
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Members
|
|
||||||
.l-sub-section
|
|
||||||
h3 constructor
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
constructor()
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 connections
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
<a href='../core/EventEmitter-class.html'><code>EventEmitter</code></a>
|
|
||||||
of <a href='MockConnection-class.html'><code>MockConnection</code></a> instances that have been created by this backend. Can be subscribed
|
|
||||||
to in order to respond to connections.
|
|
||||||
|
|
||||||
#Example
|
|
||||||
|
|
||||||
```
|
|
||||||
import {MockBackend, Http, BaseRequestOptions} from 'angular2/http';
|
|
||||||
import {Injector} from 'angular2/di';
|
|
||||||
|
|
||||||
it('should get a response', () => {
|
|
||||||
var connection; //this will be set when a new connection is emitted from the backend.
|
|
||||||
var text; //this will be set from mock response
|
|
||||||
var injector = Injector.resolveAndCreate([
|
|
||||||
MockBackend,
|
|
||||||
bind(Http).toFactory(backend, options) {
|
|
||||||
return new Http(backend, options);
|
|
||||||
}, [MockBackend, BaseRequestOptions]]);
|
|
||||||
var backend = injector.get(MockBackend);
|
|
||||||
var http = injector.get(Http);
|
|
||||||
backend.connections.subscribe(c => connection = c);
|
|
||||||
http.request('something.json').subscribe(res => {
|
|
||||||
text = res.text();
|
|
||||||
});
|
|
||||||
connection.mockRespond(new Response({body: 'Something'}));
|
|
||||||
expect(text).toBe('Something');
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
This property only exists in the mock implementation, not in real Backends.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 connectionsArray
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
An array representation of `connections`. This array will be updated with each connection that
|
|
||||||
is created by this backend.
|
|
||||||
|
|
||||||
This property only exists in the mock implementation, not in real Backends.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 pendingConnections
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
<a href='../core/EventEmitter-class.html'><code>EventEmitter</code></a> of <a href='MockConnection-class.html'><code>MockConnection</code></a> instances that haven't yet been resolved (i.e.
|
|
||||||
with a `readyState`
|
|
||||||
less than 4). Used internally to verify that no connections are pending via the
|
|
||||||
`verifyNoPendingRequests` method.
|
|
||||||
|
|
||||||
This property only exists in the mock implementation, not in real Backends.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 verifyNoPendingRequests
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
verifyNoPendingRequests()
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Checks all connections, and raises an exception if any connection has not received a response.
|
|
||||||
|
|
||||||
This method only exists in the mock implementation, not in real Backends.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 resolveAllConnections
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
resolveAllConnections()
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Can be used in conjunction with `verifyNoPendingRequests` to resolve any not-yet-resolve
|
|
||||||
connections, if it's expected that there are connections that have not yet received a response.
|
|
||||||
|
|
||||||
This method only exists in the mock implementation, not in real Backends.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 createConnection
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
createConnection(req: Request)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Creates a new <a href='MockConnection-class.html'><code>MockConnection</code></a>. This is equivalent to calling `new
|
|
||||||
MockConnection()`, except that it also will emit the new `Connection` to the `connections`
|
|
||||||
emitter of this `MockBackend` instance. This method will usually only be used by tests
|
|
||||||
against the framework itself, not by end-users.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,159 +0,0 @@
|
||||||
|
|
||||||
p.location-badge.
|
|
||||||
exported from <a href='../http'>angular2/http</a>
|
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/http/backends/mock_backend.ts#L8-L99">angular2/src/http/backends/mock_backend.ts (line 8)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Mock Connection to represent a <a href='Connection-class.html'><code>Connection</code></a> for tests.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Annotations
|
|
||||||
.l-sub-section
|
|
||||||
h3.annotation IMPLEMENTS
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
@IMPLEMENTS(Connection)
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Members
|
|
||||||
.l-sub-section
|
|
||||||
h3 constructor
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
constructor(req: Request)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 readyState
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Describes the state of the connection, based on `XMLHttpRequest.readyState`, but with
|
|
||||||
additional states. For example, state 5 indicates an aborted connection.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 request
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
<a href='Request-class.html'><code>Request</code></a> instance used to create the connection.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 response
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
<a href='../core/EventEmitter-class.html'><code>EventEmitter</code></a> of <a href='Response-class.html'><code>Response</code></a>. Can be subscribed to in order to be notified when a
|
|
||||||
response is available.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 dispose
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
dispose()
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Changes the `readyState` of the connection to a custom state of 5 (cancelled).
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 mockRespond
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
mockRespond(res: Response)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Sends a mock response to the connection. This response is the value that is emitted to the
|
|
||||||
<a href='../core/EventEmitter-class.html'><code>EventEmitter</code></a> returned by <a href='Http-class.html'><code>Http</code></a>.
|
|
||||||
|
|
||||||
#Example
|
|
||||||
|
|
||||||
```
|
|
||||||
var connection;
|
|
||||||
backend.connections.subscribe(c => connection = c);
|
|
||||||
http.request('data.json').subscribe(res => console.log(res.text()));
|
|
||||||
connection.mockRespond(new Response('fake response')); //logs 'fake response'
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 mockDownload
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
mockDownload(res: Response)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Not yet implemented!
|
|
||||||
|
|
||||||
Sends the provided <a href='Response-class.html'><code>Response</code></a> to the `downloadObserver` of the `Request`
|
|
||||||
associated with this connection.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 mockError
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
mockError(err?: Error)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Emits the provided error object as an error to the <a href='Response-class.html'><code>Response</code></a> <a href='../core/EventEmitter-class.html'><code>EventEmitter</code></a>
|
|
||||||
returned
|
|
||||||
from <a href='Http-class.html'><code>Http</code></a>.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,84 +0,0 @@
|
||||||
|
|
||||||
p.location-badge.
|
|
||||||
exported from <a href='../http'>angular2/http</a>
|
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/http/enums.ts#L55-L68">angular2/src/http/enums.ts (line 55)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
All possible states in which a connection can be, based on
|
|
||||||
[States](http://www.w3.org/TR/XMLHttpRequest/#states) from the `XMLHttpRequest` spec, but with an
|
|
||||||
additional "CANCELLED" state.
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Members
|
|
||||||
.l-sub-section
|
|
||||||
h3 UNSENT
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 OPEN
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 HEADERS_RECEIVED
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 LOADING
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 DONE
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 CANCELLED
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,127 +0,0 @@
|
||||||
|
|
||||||
p.location-badge.
|
|
||||||
exported from <a href='../http'>angular2/http</a>
|
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/http/static_request.ts#L10-L61">angular2/src/http/static_request.ts (line 10)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Creates `Request` instances from provided values.
|
|
||||||
|
|
||||||
The Request's interface is inspired by the Request constructor defined in the [Fetch
|
|
||||||
Spec](https://fetch.spec.whatwg.org/#request-class),
|
|
||||||
but is considered a static value whose body can be accessed many times. There are other
|
|
||||||
differences in the implementation, but this is the most significant.
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Members
|
|
||||||
.l-sub-section
|
|
||||||
h3 constructor
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
constructor(requestOptions: RequestOptions)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 method
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Http method with which to perform the request.
|
|
||||||
|
|
||||||
Defaults to GET.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 mode
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 credentials
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 headers
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Headers object based on the `Headers` class in the [Fetch
|
|
||||||
Spec](https://fetch.spec.whatwg.org/#headers-class). <a href='Headers-class.html'><code>Headers</code></a> class reference.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 url
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Url of the remote resource
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 cache
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 text
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
text()
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Returns the request's body as string, assuming that body exists. If body is undefined, return
|
|
||||||
empty
|
|
||||||
string.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,83 +0,0 @@
|
||||||
|
|
||||||
p.location-badge.
|
|
||||||
exported from <a href='../http'>angular2/http</a>
|
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/http/enums.ts#L11-L24">angular2/src/http/enums.ts (line 11)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Acceptable cache option to be associated with a <a href='Request-class.html'><code>Request</code></a>, based on
|
|
||||||
[RequestCache](https://fetch.spec.whatwg.org/#requestcache) from the Fetch spec.
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Members
|
|
||||||
.l-sub-section
|
|
||||||
h3 Default
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 NoStore
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 Reload
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 NoCache
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 ForceCache
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 OnlyIfCached
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
|
|
||||||
p.location-badge.
|
|
||||||
exported from <a href='../http'>angular2/http</a>
|
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/http/enums.ts#L24-L34">angular2/src/http/enums.ts (line 24)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Acceptable credentials option to be associated with a <a href='Request-class.html'><code>Request</code></a>, based on
|
|
||||||
[RequestCredentials](https://fetch.spec.whatwg.org/#requestcredentials) from the Fetch spec.
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Members
|
|
||||||
.l-sub-section
|
|
||||||
h3 Omit
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 SameOrigin
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 Include
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,94 +0,0 @@
|
||||||
|
|
||||||
p.location-badge.
|
|
||||||
exported from <a href='../http'>angular2/http</a>
|
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/http/enums.ts#L34-L47">angular2/src/http/enums.ts (line 34)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Supported http methods.
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Members
|
|
||||||
.l-sub-section
|
|
||||||
h3 GET
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 POST
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 PUT
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 DELETE
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 OPTIONS
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 HEAD
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 PATCH
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
|
|
||||||
p.location-badge.
|
|
||||||
exported from <a href='../http'>angular2/http</a>
|
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/http/enums.ts#L1-L11">angular2/src/http/enums.ts (line 1)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Acceptable origin modes to be associated with a <a href='Request-class.html'><code>Request</code></a>, based on
|
|
||||||
[RequestMode](https://fetch.spec.whatwg.org/#requestmode) from the Fetch spec.
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Members
|
|
||||||
.l-sub-section
|
|
||||||
h3 Cors
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 NoCors
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 SameOrigin
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,138 +0,0 @@
|
||||||
|
|
||||||
p.location-badge.
|
|
||||||
exported from <a href='../http'>angular2/http</a>
|
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/http/base_request_options.ts#L5-L62">angular2/src/http/base_request_options.ts (line 5)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Creates a request options object similar to the `RequestInit` description
|
|
||||||
in the [Fetch
|
|
||||||
Spec](https://fetch.spec.whatwg.org/#requestinit) to be optionally provided when instantiating a
|
|
||||||
<a href='Request-class.html'><code>Request</code></a>.
|
|
||||||
|
|
||||||
All values are null by default.
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Members
|
|
||||||
.l-sub-section
|
|
||||||
h3 constructor
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
constructor({method, headers, body, mode, credentials, cache, url}?: IRequestOptions)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 method
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Http method with which to execute the request.
|
|
||||||
|
|
||||||
Defaults to "GET".
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 headers
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Headers object based on the `Headers` class in the [Fetch
|
|
||||||
Spec](https://fetch.spec.whatwg.org/#headers-class).
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 body
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Body to be used when creating the request.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 mode
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 credentials
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 cache
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 url
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 merge
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
merge(options?: IRequestOptions)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Creates a copy of the `RequestOptions` instance, using the optional input as values to override
|
|
||||||
existing values.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,227 +0,0 @@
|
||||||
|
|
||||||
p.location-badge.
|
|
||||||
exported from <a href='../http'>angular2/http</a>
|
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/http/static_response.ts#L5-L115">angular2/src/http/static_response.ts (line 5)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Creates `Response` instances from provided values.
|
|
||||||
|
|
||||||
Though this object isn't
|
|
||||||
usually instantiated by end-users, it is the primary object interacted with when it comes time to
|
|
||||||
add data to a view.
|
|
||||||
|
|
||||||
#Example
|
|
||||||
|
|
||||||
```
|
|
||||||
http.request('my-friends.txt').subscribe(response => this.friends = response.text());
|
|
||||||
```
|
|
||||||
|
|
||||||
The Response's interface is inspired by the Response constructor defined in the [Fetch
|
|
||||||
Spec](https://fetch.spec.whatwg.org/#response-class), but is considered a static value whose body
|
|
||||||
can be accessed many times. There are other differences in the implementation, but this is the
|
|
||||||
most significant.
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Members
|
|
||||||
.l-sub-section
|
|
||||||
h3 constructor
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
constructor(responseOptions: ResponseOptions)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 type
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
One of "basic", "cors", "default", "error, or "opaque".
|
|
||||||
|
|
||||||
Defaults to "default".
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 ok
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
True if the response's status is within 200-299
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 url
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
URL of response.
|
|
||||||
|
|
||||||
Defaults to empty string.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 status
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Status code returned by server.
|
|
||||||
|
|
||||||
Defaults to 200.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 statusText
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Text representing the corresponding reason phrase to the `status`, as defined in [ietf rfc 2616
|
|
||||||
section 6.1.1](https://tools.ietf.org/html/rfc2616#section-6.1.1)
|
|
||||||
|
|
||||||
Defaults to "OK"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 bytesLoaded
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Non-standard property
|
|
||||||
|
|
||||||
Denotes how many of the response body's bytes have been loaded, for example if the response is
|
|
||||||
the result of a progress event.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 totalBytes
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Non-standard property
|
|
||||||
|
|
||||||
Denotes how many bytes are expected in the final response body.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 headers
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Headers object based on the `Headers` class in the [Fetch
|
|
||||||
Spec](https://fetch.spec.whatwg.org/#headers-class).
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 blob
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
blob()
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Not yet implemented
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 json
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
json()
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Attempts to return body as parsed `JSON` object, or raises an exception.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 text
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
text()
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Returns the body as a string, presuming `toString()` can be called on the response body.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 arrayBuffer
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
arrayBuffer()
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Not yet implemented
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,119 +0,0 @@
|
||||||
|
|
||||||
p.location-badge.
|
|
||||||
exported from <a href='../http'>angular2/http</a>
|
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/http/base_response_options.ts#L5-L44">angular2/src/http/base_response_options.ts (line 5)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Creates a response options object similar to the
|
|
||||||
[ResponseInit](https://fetch.spec.whatwg.org/#responseinit) description
|
|
||||||
in the Fetch
|
|
||||||
Spec to be optionally provided when instantiating a
|
|
||||||
<a href='Response-class.html'><code>Response</code></a>.
|
|
||||||
|
|
||||||
All values are null by default.
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Members
|
|
||||||
.l-sub-section
|
|
||||||
h3 constructor
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
constructor({body, status, headers, statusText, type, url}?: IResponseOptions)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 body
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 status
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 headers
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 statusText
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 type
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 url
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 merge
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
merge(options?: IResponseOptions)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,71 +0,0 @@
|
||||||
|
|
||||||
p.location-badge.
|
|
||||||
exported from <a href='../http'>angular2/http</a>
|
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/http/enums.ts#L68-L80">angular2/src/http/enums.ts (line 68)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Acceptable response types to be associated with a <a href='Response-class.html'><code>Response</code></a>, based on
|
|
||||||
[ResponseType](https://fetch.spec.whatwg.org/#responsetype) from the Fetch spec.
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Members
|
|
||||||
.l-sub-section
|
|
||||||
h3 Basic
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 Cors
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 Default
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 Error
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 Opaque
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,146 +0,0 @@
|
||||||
|
|
||||||
p.location-badge.
|
|
||||||
exported from <a href='../http'>angular2/http</a>
|
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/http/url_search_params.ts#L22-L65">angular2/src/http/url_search_params.ts (line 22)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Map-like representation of url search parameters, based on
|
|
||||||
[URLSearchParams](https://url.spec.whatwg.org/#urlsearchparams) in the url living standard.
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Members
|
|
||||||
.l-sub-section
|
|
||||||
h3 constructor
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
constructor(rawParams: string)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 paramsMap
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 rawParams
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 has
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
has(param: string)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 get
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
get(param: string)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 getAll
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
getAll(param: string)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 append
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
append(param: string, val: string)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 toString
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
toString()
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 delete
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
delete(param: string)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,73 +0,0 @@
|
||||||
|
|
||||||
p.location-badge.
|
|
||||||
exported from <a href='../http'>angular2/http</a>
|
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/http/backends/xhr_backend.ts#L75-L109">angular2/src/http/backends/xhr_backend.ts (line 75)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Creates <a href='XHRConnection-class.html'><code>XHRConnection</code></a> instances.
|
|
||||||
|
|
||||||
This class would typically not be used by end users, but could be
|
|
||||||
overridden if a different backend implementation should be used,
|
|
||||||
such as in a node backend.
|
|
||||||
|
|
||||||
#Example
|
|
||||||
|
|
||||||
```
|
|
||||||
import {Http, MyNodeBackend, httpInjectables, BaseRequestOptions} from 'angular2/http';
|
|
||||||
@Component({
|
|
||||||
viewBindings: [
|
|
||||||
httpInjectables,
|
|
||||||
bind(Http).toFactory((backend, options) => {
|
|
||||||
return new Http(backend, options);
|
|
||||||
}, [MyNodeBackend, BaseRequestOptions])]
|
|
||||||
})
|
|
||||||
class MyComponent {
|
|
||||||
constructor(http:Http) {
|
|
||||||
http('people.json').subscribe(res => this.people = res.json());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.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(_browserXHR: BrowserXhr, _baseResponseOptions: ResponseOptions)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 createConnection
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
createConnection(request: Request)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,85 +0,0 @@
|
||||||
|
|
||||||
p.location-badge.
|
|
||||||
exported from <a href='../http'>angular2/http</a>
|
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/http/backends/xhr_backend.ts#L9-L75">angular2/src/http/backends/xhr_backend.ts (line 9)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Creates connections using `XMLHttpRequest`. Given a fully-qualified
|
|
||||||
request, an `XHRConnection` will immediately create an `XMLHttpRequest` object and send the
|
|
||||||
request.
|
|
||||||
|
|
||||||
This class would typically not be created or interacted with directly inside applications, though
|
|
||||||
the <a href='MockConnection-class.html'><code>MockConnection</code></a> may be interacted with in tests.
|
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 Members
|
|
||||||
.l-sub-section
|
|
||||||
h3 constructor
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
constructor(req: Request, browserXHR: BrowserXhr, baseResponseOptions?: ResponseOptions)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 request
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 response
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Response <a href='../core/EventEmitter-class.html'><code>EventEmitter</code></a> which emits a single <a href='Response-class.html'><code>Response</code></a> value on load event of
|
|
||||||
`XMLHttpRequest`.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 readyState
|
|
||||||
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 dispose
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
dispose()
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Calls abort on the underlying XMLHttpRequest.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,122 +0,0 @@
|
||||||
{
|
|
||||||
"index" : {
|
|
||||||
"title" : "Http",
|
|
||||||
"intro" : "The http module provides services to perform http requests. To get started, see the <a href='Http-class.html'><code>Http</code></a>class."
|
|
||||||
},
|
|
||||||
|
|
||||||
"MockConnection-class" : {
|
|
||||||
"title" : "MockConnection Class"
|
|
||||||
},
|
|
||||||
|
|
||||||
"MockBackend-class" : {
|
|
||||||
"title" : "MockBackend Class"
|
|
||||||
},
|
|
||||||
|
|
||||||
"Request-class" : {
|
|
||||||
"title" : "Request Class"
|
|
||||||
},
|
|
||||||
|
|
||||||
"Response-class" : {
|
|
||||||
"title" : "Response Class"
|
|
||||||
},
|
|
||||||
|
|
||||||
"IRequestOptions-interface" : {
|
|
||||||
"title" : "IRequestOptions Interface"
|
|
||||||
},
|
|
||||||
|
|
||||||
"IResponseOptions-interface" : {
|
|
||||||
"title" : "IResponseOptions Interface"
|
|
||||||
},
|
|
||||||
|
|
||||||
"Connection-class" : {
|
|
||||||
"title" : "Connection Class"
|
|
||||||
},
|
|
||||||
|
|
||||||
"ConnectionBackend-class" : {
|
|
||||||
"title" : "ConnectionBackend Class"
|
|
||||||
},
|
|
||||||
|
|
||||||
"BrowserXhr-class" : {
|
|
||||||
"title" : "BrowserXhr Class"
|
|
||||||
},
|
|
||||||
|
|
||||||
"BaseRequestOptions-class" : {
|
|
||||||
"title" : "BaseRequestOptions Class"
|
|
||||||
},
|
|
||||||
|
|
||||||
"RequestOptions-class" : {
|
|
||||||
"title" : "RequestOptions Class"
|
|
||||||
},
|
|
||||||
|
|
||||||
"BaseResponseOptions-class" : {
|
|
||||||
"title" : "BaseResponseOptions Class"
|
|
||||||
},
|
|
||||||
|
|
||||||
"ResponseOptions-class" : {
|
|
||||||
"title" : "ResponseOptions Class"
|
|
||||||
},
|
|
||||||
|
|
||||||
"XHRBackend-class" : {
|
|
||||||
"title" : "XHRBackend Class"
|
|
||||||
},
|
|
||||||
|
|
||||||
"XHRConnection-class" : {
|
|
||||||
"title" : "XHRConnection Class"
|
|
||||||
},
|
|
||||||
|
|
||||||
"JSONPBackend-class" : {
|
|
||||||
"title" : "JSONPBackend Class"
|
|
||||||
},
|
|
||||||
|
|
||||||
"JSONPConnection-class" : {
|
|
||||||
"title" : "JSONPConnection Class"
|
|
||||||
},
|
|
||||||
|
|
||||||
"Http-class" : {
|
|
||||||
"title" : "Http Class"
|
|
||||||
},
|
|
||||||
|
|
||||||
"Jsonp-class" : {
|
|
||||||
"title" : "Jsonp Class"
|
|
||||||
},
|
|
||||||
|
|
||||||
"Headers-class" : {
|
|
||||||
"title" : "Headers Class"
|
|
||||||
},
|
|
||||||
|
|
||||||
"ResponseTypes-enum" : {
|
|
||||||
"title" : "ResponseTypes Enum"
|
|
||||||
},
|
|
||||||
|
|
||||||
"ReadyStates-enum" : {
|
|
||||||
"title" : "ReadyStates Enum"
|
|
||||||
},
|
|
||||||
|
|
||||||
"RequestMethods-enum" : {
|
|
||||||
"title" : "RequestMethods Enum"
|
|
||||||
},
|
|
||||||
|
|
||||||
"RequestCredentialsOpts-enum" : {
|
|
||||||
"title" : "RequestCredentialsOpts Enum"
|
|
||||||
},
|
|
||||||
|
|
||||||
"RequestCacheOpts-enum" : {
|
|
||||||
"title" : "RequestCacheOpts Enum"
|
|
||||||
},
|
|
||||||
|
|
||||||
"RequestModesOpts-enum" : {
|
|
||||||
"title" : "RequestModesOpts Enum"
|
|
||||||
},
|
|
||||||
|
|
||||||
"URLSearchParams-class" : {
|
|
||||||
"title" : "URLSearchParams Class"
|
|
||||||
},
|
|
||||||
|
|
||||||
"httpInjectables-var" : {
|
|
||||||
"title" : "httpInjectables Var"
|
|
||||||
},
|
|
||||||
|
|
||||||
"jsonpInjectables-var" : {
|
|
||||||
"title" : "jsonpInjectables Var"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,25 +0,0 @@
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 httpInjectables <span class="type">variable</span>
|
|
||||||
p.location-badge.
|
|
||||||
exported from <a href='../http'>angular2/http</a>
|
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/http.ts#L64-L71">angular2/http.ts (line 64)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
Provides a basic set of injectables to use the <a href='Http-class.html'><code>Http</code></a> service in any application.
|
|
||||||
|
|
||||||
#Example
|
|
||||||
|
|
||||||
```
|
|
||||||
import {httpInjectables, Http} from 'angular2/http';
|
|
||||||
@Component({selector: 'http-app', viewBindings: [httpInjectables]})
|
|
||||||
@View({template: '{{data}}'})
|
|
||||||
class MyApp {
|
|
||||||
constructor(http:Http) {
|
|
||||||
http.request('data.txt').subscribe(res => this.data = res.text());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
p.location-badge.
|
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/http.ts#L1-L81">angular2/http.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 })
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
|
|
||||||
.l-main-section
|
|
||||||
h2 jsonpInjectables <span class="type">variable</span>
|
|
||||||
p.location-badge.
|
|
||||||
exported from <a href='../http'>angular2/http</a>
|
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/http.ts#L73-L80">angular2/http.ts (line 73)</a>
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
p.location-badge.
|
p.location-badge.
|
||||||
exported from <a href='../pipes'>angular2/pipes</a>
|
exported from <a href='../pipes'>angular2/pipes</a>
|
||||||
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/change_detection/pipes/async_pipe.ts#L28-L125">angular2/src/change_detection/pipes/async_pipe.ts (line 28)</a>
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/pipes/async_pipe.ts#L33-L130">angular2/src/pipes/async_pipe.ts (line 33)</a>
|
||||||
|
|
||||||
:markdown
|
:markdown
|
||||||
Implements async bindings to Observable and Promise.
|
Implements async bindings to Observable and Promise.
|
||||||
|
@ -28,6 +28,23 @@ p.location-badge.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.l-main-section
|
||||||
|
h2 Annotations
|
||||||
|
.l-sub-section
|
||||||
|
h3.annotation Pipe
|
||||||
|
pre.prettyprint
|
||||||
|
code.
|
||||||
|
@Pipe({name: 'async'})
|
||||||
|
|
||||||
|
|
||||||
|
.l-sub-section
|
||||||
|
h3.annotation Injectable
|
||||||
|
pre.prettyprint
|
||||||
|
code.
|
||||||
|
@Injectable()
|
||||||
|
|
||||||
|
|
||||||
.l-main-section
|
.l-main-section
|
||||||
h2 Members
|
h2 Members
|
||||||
.l-sub-section
|
.l-sub-section
|
||||||
|
@ -45,22 +62,6 @@ p.location-badge.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
|
||||||
h3 supports
|
|
||||||
|
|
||||||
|
|
||||||
pre.prettyprint
|
|
||||||
code.
|
|
||||||
supports(obj: any)
|
|
||||||
|
|
||||||
:markdown
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-sub-section
|
.l-sub-section
|
||||||
h3 onDestroy
|
h3 onDestroy
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue