O'Reilly logo

Getting Started with Backbone Marionette by Arturo Soto, Raymundo Armendariz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Taking advantage of the Marionette.Renderer object

As we saw in Chapter 3, Marionette View Types and Their Use, Marionette does the great job of removing the repetitive code needed in order to render views. But behind the scenes, what Marionette does is it delegates this task to the Renderer object. Its responsibility is to load and compile the template into the .template function and to pass the data to be used in order to properly render the model of the view. This means that every view object in Marionette uses the Renderer object. This object can also help to render HTML into DOM by just passing a template with the data to be used for this purpose.

Let's say that for some reason we need to append HTML into our view, but we don't want to call ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required