Created
August 15, 2011 14:26
-
-
Save ifandelse/1146858 to your computer and use it in GitHub Desktop.
How to use the Knockout.js-External-Template-Engine to Eager Load Templates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tmplEagerLoad = [ "customer", "user", "search", "about", "orders" ]; | |
// This will cause the templates to be requested and cached locally | |
// in script blocks for KO to pick up like any normal embedded template | |
tmpl.EagerLoad.forEach(function(template) { | |
ko.externaljQueryTemplateEngine.getTemplateNode(template); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment