In the Handlebars.js - template i am getting a senario to check the value of the array, and if the value is not equal to do a task and equal to do a taks.. i do like this, But it thrown a error, how to handle this scenario.. any one help me?
Or any one give the way to handle this properly.
myJson would be :
{
"links":[{"label":"x","link":"x"},
{"label":"y","link":"y"},
{"label":"Logout","link":"Logout"}]
}
{{#each links}}
{{#if !lable.Logout}}
<li>
<a href="{{link}}">{{label}}</a>
{{#if subLinks}}
<ul>
{{#each subLinks}}
<li><a href="{{link}}">{{label}}</a></li>
{{/each}}
</ul>
{{else}}
<div><a href="{{link}}">{{label}}</a></div>
{{/if}}
{{/each}}