This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Could we get a component binding option of '>' for one way binding up to a parent? #15902
Closed
Description
I'm submitting a ...
- bug report
- feature request
- other (Please do not submit support requests here (see above))
Current behavior:
Right now, the only option for passing values out of a child component to a parent is the '='
two way binding which everyone agrees should be avoided. Parent values will overwrite child values in this case.
Expected / new behavior:
With a '>'
binding, an author could explicitly communicate that the child is going to be providing this value and whenever it changes, it should be set to this parent property. You also avoid the performance hit of the two way binding.
Minimal reproduction of the problem with instructions:
This fiddle gives an idea of what I'm suggesting.
Angular version: 1.6.3
Browser: all