I need to iterate each element except one.
<ul>
{{#each [1,2,3,4,5] skip=3}}
<li>{{@key}}</li>
{{/each}}
</ul>
===>
iterated keys [1,2,4,5]
I need to iterate each element except one.
<ul>
{{#each [1,2,3,4,5] skip=3}}
<li>{{@key}}</li>
{{/each}}
</ul>
===>
iterated keys [1,2,4,5]
If you want to do all this inside handlebars. Then use an {{#if }}
clause to filter out your element.
But I think the cleaner way is to inject clean data into your templates. So my take is that you should filter the array with JavaScript before passing it inside your template.