{{#each}} を使用して Meteor のコレクションを反復処理しています。AngularJS で $last を使用して ngRepeat を使用できるように、最後の要素にいるかどうかを知りたいです。
たとえば、「私は猫、犬、イルカが好きです」のような人間が読める列挙を構築するために使用できます。
Template.myTemplate.helpers({
likedAnimals: function(){return ['dogs','cats','dolphins'];}
});
<template name='myTemplate'>
I like
{{#each likedAnimals}}
{{#if !$first && !$last}}, {{/if}}
{{#if $last}} and {{/if}}
{{this}}
{{/each}}
</template>
Meteor でこの状態を確認する方法はありますか?