0

I have found a few answers for Angular JS dirty checking and all the example given on the web are all for AngularJS (the old version of Angular, the one that needed you to include an angular js script in the code).

Now, with Angular things are different in terms of how we code. I went through the Angular site as well and found no mention of dirty checking.

My question is how to avoid unnecessary DOM updates. I got to know that in AngularJS we can avoid that by putting some logic in dirty checking / watchers.

But how can that be done in Angular? Using Lifecycle Hooks ?

SimpleGuy
  • 2,606
  • 4
  • 23
  • 39
  • 1
    It's called change detection in Angular2+. It's a bit more robust than dirty checking in AngularJS to say the least. See here: https://www.mokkapps.de/blog/the-last-guide-for-angular-change-detection-you-will-ever-need – ruth Jul 16 '21 at 06:39

0 Answers0