docs: fix issue 24571 in ngOnChanges (#42517)
fix issue #24571 in ngOnChanges doc PR Close #42517
This commit is contained in:
parent
f33fa04fb8
commit
5c0541f351
|
@ -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...
|
||||
|
|
Loading…
Reference in New Issue