this is angular html code, I think that the problem is caused by input component(app-product) that called into my viewenter image description here
Asked
Active
Viewed 344 times
0
-
https://stackoverflow.com/questions/34364880/expression-has-changed-after-it-was-checked – Ayush v Nov 10 '20 at 13:04
2 Answers
1
This error is only thrown in development mode, you won't see it in production. It occurs when your input value changes before the Angular change detection lifecycle completes.
Although it doesn't have any side-effects as far as I know, you might want to change your child components (app-product in this particular example) ChangeDetectionStrategy to OnPush, which will force Angular to only check for changes when one of your inputs value change.

Berk Kurkcuoglu
- 1,453
- 1
- 9
- 11
-
Thanks for your answers, I tried both methods and it works perfectly – armel sauvy Nov 10 '20 at 15:45
0
If you are updating values of angular change listening variable inside ngAfterViewInit(), If there, move that code to ngOnInit() or use setTimeout inside ngAfterViewInit

HKR
- 39
- 3
-
Thanks for your answers, I tried both methods and it works perfectly. – armel sauvy Nov 10 '20 at 15:29