refactor(LifecycleEvent): change from onInit to Lifecycle.onInit
BREAKING CHANGE Closes #2928
This commit is contained in:

committed by
Tobias Bosch

parent
e1e7912ab2
commit
b73ba68215
@ -1,4 +1,4 @@
|
||||
import {Directive, onCheck} from 'angular2/annotations';
|
||||
import {Directive, LifecycleEvent} from 'angular2/annotations';
|
||||
import {ElementRef} from 'angular2/core';
|
||||
import {Pipes} from 'angular2/src/change_detection/pipes/pipes';
|
||||
import {Pipe} from 'angular2/src/change_detection/pipes/pipe';
|
||||
@ -28,7 +28,8 @@ import {ListWrapper, StringMapWrapper, isListLikeIterable} from 'angular2/src/fa
|
||||
* </div>
|
||||
* ```
|
||||
*/
|
||||
@Directive({selector: '[class]', lifecycle: [onCheck], properties: ['rawClass: class']})
|
||||
@Directive(
|
||||
{selector: '[class]', lifecycle: [LifecycleEvent.onCheck], properties: ['rawClass: class']})
|
||||
export class CSSClass {
|
||||
_pipe: Pipe;
|
||||
_rawClass;
|
||||
|
@ -1,5 +1,12 @@
|
||||
import {Directive} from 'angular2/annotations';
|
||||
import {ViewContainerRef, ViewRef, ProtoViewRef, Pipes, onCheck, Pipe} from 'angular2/angular2';
|
||||
import {
|
||||
ViewContainerRef,
|
||||
ViewRef,
|
||||
ProtoViewRef,
|
||||
Pipes,
|
||||
LifecycleEvent,
|
||||
Pipe
|
||||
} from 'angular2/angular2';
|
||||
import {isPresent, isBlank} from 'angular2/src/facade/lang';
|
||||
|
||||
/**
|
||||
@ -32,7 +39,8 @@ import {isPresent, isBlank} from 'angular2/src/facade/lang';
|
||||
* - `<li template="ng-for #item of items; #i = index">...</li>`
|
||||
* - `<template ng-for #item [ng-for-of]="items" #i="index"><li>...</li></template>`
|
||||
*/
|
||||
@Directive({selector: '[ng-for][ng-for-of]', properties: ['ngForOf'], lifecycle: [onCheck]})
|
||||
@Directive(
|
||||
{selector: '[ng-for][ng-for-of]', properties: ['ngForOf'], lifecycle: [LifecycleEvent.onCheck]})
|
||||
export class NgFor {
|
||||
_ngForOf: any;
|
||||
_pipe: Pipe;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Directive, onCheck} from 'angular2/annotations';
|
||||
import {Directive, LifecycleEvent} from 'angular2/annotations';
|
||||
import {ElementRef} from 'angular2/core';
|
||||
import {Pipe} from 'angular2/src/change_detection/pipes/pipe';
|
||||
import {Pipes} from 'angular2/src/change_detection/pipes/pipes';
|
||||
@ -27,7 +27,11 @@ import {Renderer} from 'angular2/src/render/api';
|
||||
* - `<div ng-style="{'text-align': alignEpr}"></div>`
|
||||
* - `<div ng-style="styleExp"></div>`
|
||||
*/
|
||||
@Directive({selector: '[ng-style]', lifecycle: [onCheck], properties: ['rawStyle: ng-style']})
|
||||
@Directive({
|
||||
selector: '[ng-style]',
|
||||
lifecycle: [LifecycleEvent.onCheck],
|
||||
properties: ['rawStyle: ng-style']
|
||||
})
|
||||
export class NgStyle {
|
||||
_pipe: Pipe;
|
||||
_rawStyle;
|
||||
|
Reference in New Issue
Block a user