Closed AlexFrazer closed 8 years ago
So I was reluctant to introduce this because it leads to code which is tightly coupled with current HTML template. And can easily break. So the proposed approach for this is that you create another component for each line. And then you navigate to parent component instance and use data()
there. So instead of having unclear hierarchy of data contexts, you have clear hierarchy of components, where each one has its own data context and you can access it. Something like parentComponent().data()
.
I see, that makes a lot of sense, thank you for the quick response!
I want to get the outer context within an each loop
The
line
helper would look as followsLogically, it feels like it should work to get the outer
order
and get thelines
field, but it does not work. How do you do this with this library?