
committed by
Harry Terkelsen

parent
c320240086
commit
d8c5ab232c
@ -49,8 +49,8 @@ export function main() {
|
||||
|
||||
@Directive({selector: '[lifecycle-dir]', lifecycle: [LifecycleEvent.DoCheck]})
|
||||
class LifecycleDir {
|
||||
constructor(private log: Log) {}
|
||||
doCheck() { this.log.add("child_doCheck"); }
|
||||
constructor(private _log: Log) {}
|
||||
doCheck() { this._log.add("child_doCheck"); }
|
||||
}
|
||||
|
||||
@Component({
|
||||
@ -69,21 +69,21 @@ class LifecycleDir {
|
||||
@View({template: `<div lifecycle-dir></div>`, directives: [LifecycleDir]})
|
||||
class LifecycleCmp {
|
||||
field;
|
||||
constructor(private log: Log) {}
|
||||
constructor(private _log: Log) {}
|
||||
|
||||
onChanges(_) { this.log.add("onChanges"); }
|
||||
onChanges(_) { this._log.add("onChanges"); }
|
||||
|
||||
onInit() { this.log.add("onInit"); }
|
||||
onInit() { this._log.add("onInit"); }
|
||||
|
||||
doCheck() { this.log.add("doCheck"); }
|
||||
doCheck() { this._log.add("doCheck"); }
|
||||
|
||||
afterContentInit() { this.log.add("afterContentInit"); }
|
||||
afterContentInit() { this._log.add("afterContentInit"); }
|
||||
|
||||
afterContentChecked() { this.log.add("afterContentChecked"); }
|
||||
afterContentChecked() { this._log.add("afterContentChecked"); }
|
||||
|
||||
afterViewInit() { this.log.add("afterViewInit"); }
|
||||
afterViewInit() { this._log.add("afterViewInit"); }
|
||||
|
||||
afterViewChecked() { this.log.add("afterViewChecked"); }
|
||||
afterViewChecked() { this._log.add("afterViewChecked"); }
|
||||
}
|
||||
|
||||
@Component({selector: 'my-comp'})
|
||||
|
@ -217,16 +217,16 @@ export function main() {
|
||||
}
|
||||
|
||||
export class MockStep implements CompileStep {
|
||||
constructor(private processElementClosure: Function,
|
||||
private processStyleClosure: Function = null) {}
|
||||
constructor(private _processElementClosure: Function,
|
||||
private _processStyleClosure: Function = null) {}
|
||||
processElement(parent: CompileElement, current: CompileElement, control: CompileControl) {
|
||||
if (isPresent(this.processElementClosure)) {
|
||||
this.processElementClosure(parent, current, control);
|
||||
if (isPresent(this._processElementClosure)) {
|
||||
this._processElementClosure(parent, current, control);
|
||||
}
|
||||
}
|
||||
processStyle(style: string): string {
|
||||
if (isPresent(this.processStyleClosure)) {
|
||||
return this.processStyleClosure(style);
|
||||
if (isPresent(this._processStyleClosure)) {
|
||||
return this._processStyleClosure(style);
|
||||
} else {
|
||||
return style;
|
||||
}
|
||||
|
Reference in New Issue
Block a user