Created
June 6, 2020 14:44
-
-
Save AregSargsyan/522aacc444a0fd5b9a3b03491eb074d3 to your computer and use it in GitHub Desktop.
ExpressionChangedAfterItHasBeenCheckedError
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
import { Component } from '@angular/core'; | |
@Component({ | |
selector: 'app-child', | |
template: `<span>{{count}}</span>`, | |
}) | |
export class ChildComponent { | |
count = 0; | |
constructor() { } | |
increaseCount() { | |
this.count += 1; | |
} | |
ngAfterViewInit() { | |
this.increaseCount() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment