-
-
Save chidumennamdi/f92d1f3d1214fac4a464d85358d76f48 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component({ | |
... | |
template:` | |
{{count}} | |
<button (click)="up()">Click</button> | |
`, | |
changeDetection: ChangeDetectionStrategy.OnPush | |
}) | |
export class DOMComponent{ | |
count = 0 | |
constructor() { | |
setTimeout(()=> this.count++,0) | |
} | |
up(){this.count++} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment