docs: fix issue 24571 in ngOnChanges (#42517)

fix issue #24571 in ngOnChanges doc

PR Close #42517
This commit is contained in:
anups1 2021-06-08 12:10:38 +05:30 committed by Jessica Janiuk
parent f33fa04fb8
commit 5c0541f351
1 changed files with 1 additions and 2 deletions

View File

@ -106,8 +106,7 @@ describe('lifecycle hooks examples', () => {
// #docregion OnChanges
@Component({selector: 'my-cmp', template: `...`})
class MyComponent implements OnChanges {
// TODO(issue/24571): remove '!'.
@Input() prop!: number;
@Input() prop: number = 0;
ngOnChanges(changes: SimpleChanges) {
// changes.prop contains the old and the new value...