Skip to content

Instantly share code, notes, and snippets.

@mallim
Created September 6, 2013 11:01
Show Gist options
  • Save mallim/6462384 to your computer and use it in GitHub Desktop.
Save mallim/6462384 to your computer and use it in GitHub Desktop.
How to load external template in marionette if not using requirejs? Get the code from http://johndavidmathis.wordpress.com/2012/09/13/preloading-backbone-marionette-templates-2/
// Take note to change the source code for the correct path
// Example of using when there are multiple templates
var preloading = Backbone.Marionette.TemplateCache.preloadTemplates(['template1','template2'], this);
$.when(preloading).done(function() {
// Do something
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment