Perhaps I’m not understanding it completely, but I fear @mhartington’s suggestion. I fear anything that diffuses responsibility for holding truth. I really really like having only one place to look for things, because when there are more, I have to worry about what happens when they don’t agree.
I find JavaScript object aliasing to be a very dangerous thing to play with, for similar reasons: when objects are mutable, I have to worry about ownership semantics. If they’re not, then I don’t.
So if I were in this situation, and I wanted to propagate changes back to a parent, I would do one of two things:
- add a corresponding
@Output()
property and use that channel - turn my child component into a
ControlValueAccessor
, bind it to aFormControl
, and use that mechanism for managing state