samedi 17 mars 2018

handlebar js if condition statement check with json object value

I have the issue of handling an if conditon in handlebars js

{"lstModel":[{"name":"Sizes","values":[{"value":"L"},{"value":"XL"},{"value":"M"}]},{"name":"Colours","values":[{"value":"Green"}]}]}


     <script type="text/x-handlebars-template" id="filter">
        <form class="col-md-6" id="filter-">
                                <label>Select </label>
                            
                                <div class="size-selector">
                                
                                    <div class="entry"></div>
                                
                                </div>
                           
                                <div class="color-selector">
                                
                                    <div class="entry" data-value= style="background: ;">&nbsp;</div>
                                
                                </div>
                            
</form></script>

The issue I'm facing is when I'm trying to check with the values of json in if condition its not showing going inside of condition. Please help.

Aucun commentaire:

Enregistrer un commentaire