@ -85,7 +85,7 @@ export abstract class ChangeDetectorRef {
|
||||
* }
|
||||
*
|
||||
* @Component({
|
||||
* selector: 'app', bindings: [DataProvider]
|
||||
* selector: 'app', providers: [DataProvider]
|
||||
* })
|
||||
* @View({
|
||||
* template: `
|
||||
@ -166,7 +166,7 @@ export abstract class ChangeDetectorRef {
|
||||
*
|
||||
* @Component({
|
||||
* selector: 'app',
|
||||
* bindings: [DataProvider]
|
||||
* providers: [DataProvider]
|
||||
* })
|
||||
* @View({
|
||||
* template: `
|
||||
|
@ -2,7 +2,7 @@ import {isBlank, isPresent, CONST} from 'angular2/src/core/facade/lang';
|
||||
import {BaseException} from 'angular2/src/core/facade/exceptions';
|
||||
import {ListWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {ChangeDetectorRef} from '../change_detector_ref';
|
||||
import {Binding, SkipSelfMetadata, OptionalMetadata, Injectable} from 'angular2/src/core/di';
|
||||
import {Provider, SkipSelfMetadata, OptionalMetadata, Injectable} from 'angular2/src/core/di';
|
||||
|
||||
export interface IterableDiffer {
|
||||
diff(object: Object): any;
|
||||
@ -36,7 +36,7 @@ export class IterableDiffers {
|
||||
}
|
||||
|
||||
/**
|
||||
* Takes an array of {@link IterableDifferFactory} and returns a binding used to extend the
|
||||
* Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the
|
||||
* inherited {@link IterableDiffers} instance with the provided factories and return a new
|
||||
* {@link IterableDiffers} instance.
|
||||
*
|
||||
@ -48,14 +48,14 @@ export class IterableDiffers {
|
||||
*
|
||||
* ```
|
||||
* @Component({
|
||||
* viewBindings: [
|
||||
* viewProviders: [
|
||||
* IterableDiffers.extend([new ImmutableListDiffer()])
|
||||
* ]
|
||||
* })
|
||||
* ```
|
||||
*/
|
||||
static extend(factories: IterableDifferFactory[]): Binding {
|
||||
return new Binding(IterableDiffers, {
|
||||
static extend(factories: IterableDifferFactory[]): Provider {
|
||||
return new Provider(IterableDiffers, {
|
||||
toFactory: (parent: IterableDiffers) => {
|
||||
if (isBlank(parent)) {
|
||||
// Typically would occur when calling IterableDiffers.extend inside of dependencies passed
|
||||
|
@ -2,7 +2,7 @@ import {isBlank, isPresent, CONST} from 'angular2/src/core/facade/lang';
|
||||
import {BaseException} from 'angular2/src/core/facade/exceptions';
|
||||
import {ListWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {ChangeDetectorRef} from '../change_detector_ref';
|
||||
import {Binding, SkipSelfMetadata, OptionalMetadata, Injectable} from 'angular2/src/core/di';
|
||||
import {Provider, SkipSelfMetadata, OptionalMetadata, Injectable} from 'angular2/src/core/di';
|
||||
|
||||
export interface KeyValueDiffer {
|
||||
diff(object: Object);
|
||||
@ -36,7 +36,7 @@ export class KeyValueDiffers {
|
||||
}
|
||||
|
||||
/**
|
||||
* Takes an array of {@link KeyValueDifferFactory} and returns a binding used to extend the
|
||||
* Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the
|
||||
* inherited {@link KeyValueDiffers} instance with the provided factories and return a new
|
||||
* {@link KeyValueDiffers} instance.
|
||||
*
|
||||
@ -48,14 +48,14 @@ export class KeyValueDiffers {
|
||||
*
|
||||
* ```
|
||||
* @Component({
|
||||
* viewBindings: [
|
||||
* viewProviders: [
|
||||
* KeyValueDiffers.extend([new ImmutableMapDiffer()])
|
||||
* ]
|
||||
* })
|
||||
* ```
|
||||
*/
|
||||
static extend(factories: KeyValueDifferFactory[]): Binding {
|
||||
return new Binding(KeyValueDiffers, {
|
||||
static extend(factories: KeyValueDifferFactory[]): Provider {
|
||||
return new Provider(KeyValueDiffers, {
|
||||
toFactory: (parent: KeyValueDiffers) => {
|
||||
if (isBlank(parent)) {
|
||||
// Typically would occur when calling KeyValueDiffers.extend inside of dependencies passed
|
||||
|
Reference in New Issue
Block a user