I'm loading a precompiled handlebars template in a layout view. I'm defining the regions, but, I get the error:
Uncaught Error: An "el" #questions-section must exist in DOM
(of course that node exists in the template).
Is this happening because I'm using a precompiled template? The code:
q.boxView = Marionette.LayoutView.extend({
tagName : 'li',
className : "sortable_boxes_original",
template: Handlebars.templates["repoboxview"],
initialize : function(){
this.createQuestionsCollection();
this.createResponsesModel();
this.listenTo(this.model.get("response"), 'change', this.triggerChanged);
},
regions: {
questions: "#questions-section"
},
onBeforeRender: function(){
var that = this;
this.getRegion("questions").show(new q.questionsListView({collection: this.model.get("questions"), model: this.model}));
}
});