【发布时间】:2014-11-12 20:32:04
【问题描述】:
在我的应用程序中,我正在使用把手模板插件,我在这里有点困惑,如何将把手模板集成到使用单独模板的木偶项目视图中?
这是我的代码:
define([
'jquery',
'underscore',
'backbone',
'marionette',
'hbs!scripts/templates/login/loginTemp'], // this is my handlebars template.
function ($,_,Backbone,Marionette,loginTemplate) {
"use strict";
socialApp = window.socialApp || {};
socialApp.loginView = Backbone.Marionette.ItemView.extend({
tagName:'div',
className:'loginContainer',
template: '#loginTemplate' //this is template for login alone (from DOM )
});
return socialApp.loginView;
}
);
“loginTemp” - 包含登录模板所需的所有详细信息。
【问题讨论】:
标签: templates backbone.js handlebars.js marionette