我一直在搜索 sammy.js 和车把的文档很长一段时间,但我一辈子都无法确定http://sammyjs.org/docs/api/0.7.1/all#的位置Sammy.Handlebars(示例 #2)mypartial.hb 被指示加载到 {{>hello_friend}}。想法?
问问题
1877 次
1 回答
0
我这个问题很老,但对于所有 sammyjs 爱好者
var app = $.sammy('#app', function(){
this.use('Mustache', 'ms');
this.get('#/hello/:name/to/:friend', function(context){
this.load('mypartial.ms')
.then(function(partial){
context.partials = {hello_friend: partial};
context.name = context.params.name;
context.friend = context.params.friend;
context.partial('mytemplate.ms');
});
});
});
http://sammyjs.org/docs/api/0.7.4/all#Sammy.Handlebars 注意版本是 0.7.4
于 2017-04-10T14:23:00.877 回答