나는이의 CompositeView는 Marionette.Region의 자식 CompositeView
TemplateNotFoundError은 :부터 템플릿을 렌더링 할 수 없습니다 그 거짓 null 또는 정의되지 않은
define(function (require) {
"use strict";
var _ = require('underscore'),
Marionette = require('backbone.marionette'),
Row = require('app/views/Dam/row'),
tpl = require('text!tpl/Dam/table.html'),
template = _.template(tpl);
return Marionette.CompositeView.extend({
tagName: "table",
className: "table table-bordered",
initialize: function (opt) {
this.ev = opt.ev;
},
childView: Row,
childViewContainer: function(){
return "tbody"
},
childViewOptions: function (model, index) {
return {
ev: this.ev
}
},
onRender: function() {
this.ev.trigger('App:Loading:Hide', true);
}
});
});
에 대한 템플릿을 정의하려면 어떻게합니까. 방금 region.show(new CompositeView)
처럼 방아쇠를 당깁니다. 최신 백본과 마리오네트를 사용하고 있습니다. 당신이 어떤보기
Marionette.CompositeView.extend({
tagName: "table",
template : tpl,
.....
.....
에 대한 템플릿을 정의로
을 작동합니다. [this] (http://marionettejs.com/docs/marionette.compositeview.html)을 읽으십시오. –
필자는 [this] (http://marionettejs.com/docs/marionette.compositeviews-childviewcontainer)를 따르지만 requirejs를 사용하여 템플릿을로드합니다. – Muhaimin