View
View
classThis class is a sort of black-box managing views inside the application. It relies on both Handlebars (to generate the HTML from .hbs files) and jQuery to inject the results inside the DOM.
Fills the current page with the result of the template compilation.
Parameters
Returns null
Appends the result of the template compilation to the current page.
The process is stopped if the current action doesn’t match with the requested template. Thus, if an action takes too long to load data and the user has clicked on a different one, they won’t have elements of the former shown.
Parameters
Returns null
Compiles a template through Handlebars. If the template’s already been compiled, we just read it from the cache.
Parameters
location
String The template’s location.Returns Function
Facility to define partials as Handlebars helpers. It compiles the given partial, render it and wrap inside a Handlebars safe string.
Parameters
Returns null