2021-12-10 02:37:01 +00:00
|
|
|
/**
|
|
|
|
|
* @license
|
|
|
|
|
* Copyright Google LLC All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
2024-09-20 15:23:15 +00:00
|
|
|
* found in the LICENSE file at https://angular.dev/license
|
2021-12-10 02:37:01 +00:00
|
|
|
*/
|
|
|
|
|
|
2021-12-09 05:44:17 +00:00
|
|
|
import {ChangeDetectorRef, Component} from '@angular/core';
|
2020-08-27 15:49:41 +00:00
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
selector: 'app-root',
|
|
|
|
|
templateUrl: './app.component.html',
|
|
|
|
|
})
|
|
|
|
|
export class AppComponent {
|
|
|
|
|
counter = 0;
|
|
|
|
|
|
2021-09-08 22:39:40 +00:00
|
|
|
constructor(private _cd: ChangeDetectorRef) {}
|
2020-08-27 15:49:41 +00:00
|
|
|
|
|
|
|
|
increment(): void {
|
|
|
|
|
this.counter++;
|
|
|
|
|
this._cd.detectChanges();
|
|
|
|
|
}
|
|
|
|
|
}
|