0

AngularJs(1.x) : So far my understanding of change detection in Angularjs(1.x) , watchers gets added to watch list , and whenever any event occurs , Digest cycle triggers , that is checking of watchers "starting from rootscope". So first parent scope watchers will be checked and then chld scope. And digest Cycle always triggers from rootscope whenever any user event or async operation happens.Is that correct?

Angular2+:

So here they are saying , change detection always runs once and it will be always unidirectional flow of change(parent-to-child). How? I can pass object from parent and change it in child , so how come unidirectional?

And also , how change ditection in angularjs(1.x) is a graph? Cause every time it will start from rootscope watchers ,irrespective of whatever scope value changed?

Dont really get how angularjs has Graph structure and Angular2+ has tree?

Please clear my doubt...

karaxuna
  • 26,752
  • 13
  • 82
  • 117
Subhadeep
  • 257
  • 5
  • 13
  • Have a Look at [Change Detection Reinvented](https://www.youtube.com/watch?v=jvKGQSFQf10&t=644s) and [Angular 2 Change Detection Explained](https://www.youtube.com/watch?v=CUxD91DWkGM) – Vikas May 27 '18 at 21:34
  • 1
    See [Change detection with Observable vs Immutable](https://stackoverflow.com/questions/34313661/change-detection-with-observable-vs-immutable). – georgeawg May 28 '18 at 04:20
  • 1
    Possible duplicate of [How does Angular 2 change detection work?](https://stackoverflow.com/questions/35469024/how-does-angular-2-change-detection-work). – georgeawg May 28 '18 at 04:22

0 Answers0