Closed beatgeb closed 9 years ago
Hi Beat,
isn't that part of the following PR/commits?
9ba568dd93 70d0699f81
You are right. It points in the right direction. But in my opinion it does not work at the moment because of the usage of data.root instead of data itself
componentData = lastArgument && lastArgument.data ? lastArgument.data.root : {};
Hope #17 would cover your needs. We will try do add some other possibilites to add data to view & components. For now, you can add some global data for views & components in your routes (e.g. https://github.com/namics/generator-nitro/blob/develop/app/templates/app/core/router.js#L87 )
Thanks. That helps.
Would it make sense to allow passing data to a component via the component helper. For exmple to share data used in multiple components (like user information or labels).
I could imagine that this happens by referencing one or more data resources or the ugly way by providing serialized JSON strings (not really reusable it not done by an additional helper).
This question might be important for integrations in Spring to simulate the model provided to the view.