jeudi 28 mai 2015

Show block if resource is 'active'

I have a list of items. If I click the link-to for the item, I want the item itself to expand showing more info.

What I'd like to do, is in the #each loop, add an if conditional:

{{#each item in model itemController="item"}}
    {{item.title}}
    {{#if item.active}}
        {{item.description}}
    {{/if}
{{/each}}

The item.active is only true if the route for that item is met via a link-to or transitiontoroute. What am I missing here?




Aucun commentaire:

Enregistrer un commentaire