Skip to content Skip to sidebar Skip to footer

Backbone.Marionette Nested ItemView Either Not Rendering Or Rendering "blank" View/template

On navigating to a specific URL, a controller method is fired, which loads an ItemView into one of my application's regions. This ItemView itself (the parent) will contain a handfu

Solution 1:

The problem with your original code is this line:

$(this.ui.textInput01).html(this.appRoutefinderTextinputItemView.render());

The render method of a backbone view does not returned the rendered HTML. This method does the rendering and updates the el of the view. The return value of this method is the view itself. Marionette does not change this behavior.

You need to change the code to populate the textInput01 with the view's el. Also note that the this.ui.textInput01 is already a jQuery selected object so you don't need to wrap that again.


this.appRoutefinderTextinputItemView.render();
this.ui.textInput01.html(this.appRoutefinderTextinputItemView.el);

Post a Comment for "Backbone.Marionette Nested ItemView Either Not Rendering Or Rendering "blank" View/template"