docs: Fix code example in the ChangeDetectorRef docs (#18051)
Minor example fix: mark the 'ref' constructor parameter as a private property
This commit is contained in:
parent
9003770f02
commit
a9757ec674
|
@ -26,7 +26,7 @@ export abstract class ChangeDetectorRef {
|
||||||
* class Cmp {
|
* class Cmp {
|
||||||
* numberOfTicks = 0;
|
* numberOfTicks = 0;
|
||||||
*
|
*
|
||||||
* constructor(ref: ChangeDetectorRef) {
|
* constructor(private ref: ChangeDetectorRef) {
|
||||||
* setInterval(() => {
|
* setInterval(() => {
|
||||||
* this.numberOfTicks ++
|
* this.numberOfTicks ++
|
||||||
* // the following is required, otherwise the view will not be updated
|
* // the following is required, otherwise the view will not be updated
|
||||||
|
|
Loading…
Reference in New Issue