samedi 18 avril 2015

In Ember how do I access an attribute from a different model from the current handlebar in the html file?

I'm trying to do something like:



{{#if model.user.isAdmin}}
<div>
My name is {{model.user.name}}
</div>
{{/if}}


inside a handlebar from a controller not related to users:



<script type="text/x-handlebars" data-template-name="events/new">


How would I go about this? How can I use/show the values from another model?





Aucun commentaire:

Enregistrer un commentaire