How to use {{#if}} or {{#each}}


#1

how to use {{#if}} implemets
{{#if item.length == 0}}
i`m use ‘item.length == 0’
its error

:slight_smile:


#2

http://blazejs.org/guide/spacebars.html


#3

thanks :) :smiley::smiley::smiley::smiley::smiley:


#4

but undefined:joy::joy::joy::joy::joy::joy:


#5

i got it!
:laughing::laughing::laughing::laughing:
Template.registerHelper(‘and’,(a,b)=>{
return a && b;
});
{{#if and a b}}