版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/hongchangfirst/article/details/81288755
一种建立语义模版的工具,跟Mustache模版基本上兼容。
用双括号来表示handlebars会进行处理,比如{{variable}},表示会替换variable的内容。
循环:
{{#list people}}{{firstName}} {{lastName}}{{/list}}
people是一个json array。
条件:
{{#if title}}
{{../permalink}}
{{/if}}
注释:
Template comments with {{!-- --}}
or {{! }}
.
原文:http://blog.csdn.net/hongchangfirst/article/details/81288755
作者:hongchangfirst
hongchangfirst的主页:http://blog.csdn.net/hongchangfirst