refactor(LifecycleEvent): change from onInit to Lifecycle.onInit

BREAKING CHANGE

Closes #2928
This commit is contained in:
Misko Hevery
2015-07-04 15:04:50 +02:00
committed by Tobias Bosch
parent e1e7912ab2
commit b73ba68215
31 changed files with 245 additions and 250 deletions

View File

@ -2,8 +2,7 @@ import {CONST_EXPR} from 'angular2/src/facade/lang';
import {EventEmitter, ObservableWrapper} from 'angular2/src/facade/async';
import {List, StringMapWrapper, StringMap} from 'angular2/src/facade/collection';
import {Directive, Query, onDestroy, onChange} from 'angular2/annotations';
import {QueryList} from 'angular2/core';
import {Directive, LifecycleEvent, Query, QueryList} from 'angular2/angular2';
import {forwardRef, Ancestor, Binding, Inject} from 'angular2/di';
import {ControlContainer} from './control_container';
@ -76,7 +75,7 @@ const controlNameBinding =
hostInjector: [controlNameBinding],
properties: ['name: ngControl', 'model: ngModel'],
events: ['update: ngModel'],
lifecycle: [onDestroy, onChange],
lifecycle: [LifecycleEvent.onDestroy, LifecycleEvent.onChange],
exportAs: 'form'
})
export class NgControlName extends NgControl {
@ -115,4 +114,4 @@ export class NgControlName extends NgControl {
get control(): Control { return this.formDirective.getControl(this); }
get validator(): Function { return composeNgValidator(this.ngValidators); }
}
}