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
|
// #docregion OnChanges
|
||||||
@Component({selector: 'my-cmp', template: `...`})
|
@Component({selector: 'my-cmp', template: `...`})
|
||||||
class MyComponent implements OnChanges {
|
class MyComponent implements OnChanges {
|
||||||
// TODO(issue/24571): remove '!'.
|
@Input() prop: number = 0;
|
||||||
@Input() prop!: number;
|
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
ngOnChanges(changes: SimpleChanges) {
|
||||||
// changes.prop contains the old and the new value...
|
// changes.prop contains the old and the new value...
|
||||||
|
Loading…
x
Reference in New Issue
Block a user