-
-
Save chidumennamdi/2d466b90b0deea0e75487538a67f7f7c 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({ | |
selector: 'my-i', | |
template:` | |
{{count}} | |
` | |
}) | |
export class IComponent{ | |
count = 0 | |
constructor(private cd: ChangeDetectorRef) { | |
this.cd.detach() | |
setTimeout(()=>{ | |
this.count++ | |
if(this.count == 100){ | |
this.cd.reattach() | |
} | |
},1000) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment