lundi 29 février 2016

Access a specific index of Ember.ArrayProxy in Handlebars

I have this code in my handlebars template:

  {{#each maps as |map|}}
    {{map.title}}
  {{/each}}

Which gives me the title of every map.

But if I try to access a specific index, like this:

<p>{{maps.[0].title}}</p>

Or

<p>{{maps.Get.[0].title}}</p>

It gives me nothing (but it compiles).

the 'maps' variable is of type:

Ember.ArrayProxy

So how can I access the map located at index 0?




Aucun commentaire:

Enregistrer un commentaire