How to display a list of Strings with Handlebars.js -


i have list of strings want display handlebars.js

so far seems not possible, although seems absurd should case.

an example of product object is:

"product": {       "name": "top tp-209-nav",       "category": "top",       "brand": "living dolls",       "description": "fabric : navy-white stretch cotton long sleeves top (can worn dress)",       "price": "23.0",       "tags": [         "slips on",         " stretch cotton",         " long sleeves"       ],       "image1": {         "src": "http://www.livingdolls-closet.com/media/catalog/product/cache/1/image/9df78eab33525d08d6e5fb8d27136e95/t/p/tp-209-nav-1-living-dolls-top_1.jpg",         "ratio": 1.5       }     }, 

i want iterate through , display items in tags list.

when can see appropriate number of commas indicates list being iterated through, can't work out how display actual tag item.

{{#product.tags}}<a href="">{{val}}</a>,  {{/product.tags}}  

i had use each helper ..

{{#each product.tags}}<a href="">{{this}}</a>, {{/each}} 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -