Skip to content

Instantly share code, notes, and snippets.

@pavelpower
Created April 24, 2015 09:00
Show Gist options
  • Save pavelpower/51517ecf1434bd9251eb to your computer and use it in GitHub Desktop.
Save pavelpower/51517ecf1434bd9251eb to your computer and use it in GitHub Desktop.
sample jst in bemhtml
(function () {
return {
block: 'b-weather-grid',
tag: null,
content: [
{
block: 'jst',
before: 'obj.forEach(function(item) {',
content: [
{
elem: 'cell',
content: [
{
block: 'b-weather-item',
mods: {weather: 'sun'},
content: [
{
elem: 'title',
content: '${item.name}'
},
{
elem: 'image'
},
{
elem: 'value',
content: '${item.temp}'
},
{
elem: 'description',
content: '${item.description}'
},
{
elem: 'border'
}
]
}
]
}
],
after: '})'
}
]
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment