Angular | ExpressionChangedAfterItHasBeenCheckedError | Lets see why it comes and how can fix it | Also debug :)

Lets see why this error comes-

Now lets see when ExpressionChangedAfterItHasBeenCheckedError error will come. Just modify app.component.ts file as below-

Now question comes how we can fix it ? Lets see-

Now lets see how to debug to know from where this issue is coming

  1. Run the application, open the chrome dev tool and navigate to the console tab

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store