0

The documentation for detectChanges states:

Checks this view and its children

Does this mean it checks the direct children bindings, or does it check children recursively until it "hits" the deepest one?

LppEdd
  • 20,274
  • 11
  • 84
  • 139
  • Basically, yes, it will go recursively. More info here, https://blog.angular-university.io/how-does-angular-2-change-detection-really-work/, for instance. – Pac0 Jan 18 '19 at 12:02
  • @Pac0 strangely enough, it doesn't seem so. I've posted a question regarding this a couple days ago https://stackoverflow.com/questions/54201990/angular-detectchanges-not-working-on-child-component – LppEdd Jan 18 '19 at 12:05
  • hum, I may have misundetrstood the question or misunderstood some rules in angular, but I'm trying to create a StackBlitz to clarify the point. – Pac0 Jan 18 '19 at 12:09
  • @Pac0 thank you! Eventually I'll create one with a similar environment as mine – LppEdd Jan 18 '19 at 12:13
  • In the meantime, related, maybe duplicate : [Angular2 change detection: ngOnChanges not firing for nested object](https://stackoverflow.com/questions/34796901/angular2-change-detection-ngonchanges-not-firing-for-nested-object) – Pac0 Jan 18 '19 at 12:19
  • @Pac0 thanks, I'll give it a read! – LppEdd Jan 18 '19 at 12:21
  • it talks about nested *objects*, not component, though – Pac0 Jan 18 '19 at 12:22
  • Now I am not sure to understand the question. We are talking about change detection for `Input()` values, right ? Then, you must explicitly bind a value from grand child to child, and from child to parent. Maybe that would be easier if you how a simple example you know that it's working, and another that you would like / expect to work. – Pac0 Jan 18 '19 at 12:28

0 Answers0