[英]Handlebars partial in Sammy.js
I've been scouring the docs for sammy.js and handlebars for a good amount of time, and I cannot for the life of me, determine where in http://sammyjs.org/docs/api/0.7.1/all#Sammy.Handlebars (example #2) mypartial.hb is instructed load into {{>hello_friend}}. 我一直在寻找大量的sammy.js和handlebar的文档,但是我一生都无法确定在http://sammyjs.org/docs/api/0.7.1/all#中的位置指示Sammy.Handlebars (示例2)mypartial.hb加载到{{> hello_friend}}中。 Ideas?
有想法吗?
i this question is old but for all sammyjs lover 我这个问题很旧,但对于所有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 Note the version is 0.7.4 http://sammyjs.org/docs/api/0.7.4/all#Sammy.Handlebars注意版本是0.7.4
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.