refactor(change_detection): introduce enum ChangeDetectionStrategy
BREAKING CHANGE Closes #2497 - change detection strategy type changes from string to ChangeDetectionStrategy - CHECK_ONCE => ChangeDetectionStrategy.CheckOnce - CHECKED => ChangeDetectionStrategy.Checked - CHECK_ALWAYS => ChangeDetectionStrategy.CheckAlways - DETACHED => ChangeDetectionStrategy.Detached - ON_PUSH => ChangeDetectionStrategy.OnPush - DEFAULT => ChangeDetectionStrategy.Default - ON_PUSH_OBSERVE => ChangeDetectionStrategy.OnPushObserve
This commit is contained in:
@ -33,6 +33,7 @@ import {
|
||||
} from './metadata/directives';
|
||||
|
||||
import {ViewMetadata, ViewEncapsulation} from './metadata/view';
|
||||
import {ChangeDetectionStrategy} from 'angular2/src/core/change_detection/change_detection';
|
||||
|
||||
import {makeDecorator, makeParamDecorator, TypeDecorator, Class} from './util/decorators';
|
||||
import {Type} from 'angular2/src/core/facade/lang';
|
||||
@ -191,7 +192,7 @@ export interface ComponentFactory {
|
||||
exportAs?: string,
|
||||
compileChildren?: boolean,
|
||||
viewBindings?: List<any>,
|
||||
changeDetection?: string,
|
||||
changeDetection?: ChangeDetectionStrategy,
|
||||
}): ComponentDecorator;
|
||||
new (obj: {
|
||||
selector?: string,
|
||||
@ -203,7 +204,7 @@ export interface ComponentFactory {
|
||||
exportAs?: string,
|
||||
compileChildren?: boolean,
|
||||
viewBindings?: List<any>,
|
||||
changeDetection?: string,
|
||||
changeDetection?: ChangeDetectionStrategy,
|
||||
}): ComponentMetadata;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user