diff --git a/public/docs/_examples/lifecycle-hooks/ts/app/counter.component.ts b/public/docs/_examples/lifecycle-hooks/ts/app/counter.component.ts index 71167ab791..8efd1fbd52 100644 --- a/public/docs/_examples/lifecycle-hooks/ts/app/counter.component.ts +++ b/public/docs/_examples/lifecycle-hooks/ts/app/counter.component.ts @@ -1,7 +1,7 @@ // #docregion import { Component, Input, - OnChanges, SimpleChange, + OnChanges, SimpleChanges, } from '@angular/core'; import { LoggerService } from './logger.service'; @@ -22,7 +22,7 @@ export class MyCounterComponent implements OnChanges { @Input() counter: number; changeLog: string[] = []; - ngOnChanges(changes: {[propertyName: string]: SimpleChange}) { + ngOnChanges(changes: SimpleChanges) { // Empty the changeLog whenever counter goes to zero // hint: this is a way to respond programmatically to external value changes. @@ -36,7 +36,6 @@ export class MyCounterComponent implements OnChanges { let prev = JSON.stringify(chng.previousValue); // first time is {}; after is integer this.changeLog.push(`counter: currentValue = ${cur}, previousValue = ${prev}`); } - } /***************************************/ diff --git a/public/docs/_examples/lifecycle-hooks/ts/app/on-changes.component.ts b/public/docs/_examples/lifecycle-hooks/ts/app/on-changes.component.ts index 4c83d6f864..da3aa70716 100644 --- a/public/docs/_examples/lifecycle-hooks/ts/app/on-changes.component.ts +++ b/public/docs/_examples/lifecycle-hooks/ts/app/on-changes.component.ts @@ -2,7 +2,7 @@ // #docregion import { Component, Input, OnChanges, - SimpleChange, ViewChild + SimpleChanges, ViewChild } from '@angular/core'; class Hero { @@ -33,7 +33,7 @@ export class OnChangesComponent implements OnChanges { changeLog: string[] = []; // #docregion ng-on-changes - ngOnChanges(changes: {[propertyName: string]: SimpleChange}) { + ngOnChanges(changes: SimpleChanges) { for (let propName in changes) { let chng = changes[propName]; let cur = JSON.stringify(chng.currentValue); diff --git a/public/docs/_examples/lifecycle-hooks/ts/app/peek-a-boo.component.ts b/public/docs/_examples/lifecycle-hooks/ts/app/peek-a-boo.component.ts index 57b421c7f8..dcee428753 100644 --- a/public/docs/_examples/lifecycle-hooks/ts/app/peek-a-boo.component.ts +++ b/public/docs/_examples/lifecycle-hooks/ts/app/peek-a-boo.component.ts @@ -7,7 +7,7 @@ import { OnChanges, OnDestroy, OnInit, - SimpleChange + SimpleChanges } from '@angular/core'; import { Component, Input } from '@angular/core'; import { LoggerService } from './logger.service'; @@ -51,7 +51,7 @@ export class PeekABooComponent extends PeekABoo implements } // only called for/if there is an @input variable set by parent. - ngOnChanges(changes: {[propertyName: string]: SimpleChange}) { + ngOnChanges(changes: SimpleChanges) { let changesMsgs: string[] = []; for (let propName in changes) { if (propName === 'name') {