Angular 13: ExpressionChangedAfterItHasBeenCheckedError

Поделиться
HTML-код
  • Опубликовано: 12 сен 2024
  • Let me show you how to easily trigger the ExpressionChangedAfterItHasBeenCheckedError and some ways to fix it.
    Blog post: featuringcode....

Комментарии • 4

  • @thirumanitheivarajan7295
    @thirumanitheivarajan7295 2 года назад

    1) ExpressionChangedAfterItHasBeenCheckedError error won't affect in PROD, right? So Can I skip the error in DEV also even it throws in console?
    2) why the Angular again check the Change Detection 2nd time in DEV mode?
    3) why the Angular doesn't check the Change Detection 2nd time in PROD mode?

    • @featuringcode9192
      @featuringcode9192  2 года назад

      I wouldn't recommend you skip this error, as it can cause memory leaks and bad behavior from angular. This error appears to tell you that the tree is unstable and that you no longer have unidirectional dataflow. Check out these resources: angular.io/guide/glossary#unidirectional-data-flow + indepth.dev/posts/1065/do-you-really-know-what-unidirectional-data-flow-means-in-angular

    • @thirumanitheivarajan7295
      @thirumanitheivarajan7295 2 года назад +1

      @@featuringcode9192 Thank you very much.
      I stop my search here. Much appreciated. 🙂🤝

    • @thirumanitheivarajan7295
      @thirumanitheivarajan7295 2 года назад

      I wish to reproduce the impact in PROD mode if I skip the error in DEV mode, if the error still persists in PROD mode, what would happen, I wish to see it, can you guide me, please?