I would phrase it more as “how many levels deep of inspection you can reasonably expect Angular’s change detection to notice stuff at”, and it’s possible that things have gotten better on this front since I repeatedly stepped on this rake, but my rule is “1”. I would not bind anything deeper than foo.bar
.
I figured as much. Perhaps while we’re here I could impose on you to check out this post? When I was exposing stuff like this as a plain variable, I kept running into the problem of “how do I communicate changes to consumers (pages/components that care)?”. Exposing them as Observable
s in the service solves that problem, and incidentally should solve this one as well, because your subscription to global.valuation$
will take care of updating a property in the page controller.
…and that refactoring should obviate the need for this as well.