D
D
DevOFF2017-01-11 08:23:12
backbone.js
DevOFF, 2017-01-11 08:23:12

Backbone rendering of finished html?

Good day to all. I am getting acquainted with Backbone and then a question arose. Google did not give an answer, so I turn to you.
Made a router model view . Now the question is how do I put the finished layout in the view. If there is something in the backbone that will help me implement it. Or at least the right way to do it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2017-01-11
@alexey-m-ukolov

Backbone is agnostic with respect to your preferred method of HTML templating. Your render function could even munge together an HTML string, or use document.createElement to generate a DOM tree. However, we suggest choosing a nice JavaScript templating library. Mustache.js, Haml-js, and Eco are all fine alternatives. Because Underscore.js is already on the page, _.template is available, and is an excellent choice if you prefer simple interpolated-JavaScript style templates.
backbonejs.org/#View-render

Similar questions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question