I'm running into a wall passing a variable as a param to a component in Ember.
In one template, I'm looping through Ember Data model "user" like so:
{{#each user in users}}
{{person-entry user=user status=??}}
{{/each}}
I'm trying to pass the status element of the user. If I put {{user.status}} above the {{person-entry}} tag, it displays the correct result on the page. However, if I pass it as the value of status, it's undefined. Trying to access if from the user param also returns undefined.
When I inspect the store in the Ember console, the data is there as well.
How can I pass this value and have access to it in the component? What am I missing?
Additional: If I put {{user.status}} in the template for {{person-entry}}, it also displays correctly.
Aucun commentaire:
Enregistrer un commentaire