Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4829

Handlebars @last not supported?

$
0
0

@Hummingbird wrote:

I was trying to handle some special logic for the last item in an array and was trying to therefore use the handlebars @last helper. However, it seems the @last helper is never even set. At least it does not seem to evaluate if I try to directly print it's value and my logic does not work. May it probably be that it is not supported in ember?

{{#each model.replies as |reply|}}
    {{#if @last}}
        <button {{action 'deleteReply' reply}}>x</button>
     {{/if}}
     <div>{{reply.msg}}</div>
{{/each}}

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4829

Trending Articles