Skip to content

Instantly share code, notes, and snippets.

@zefei
Created September 1, 2014 02:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zefei/c00a5adacbf237e3a1b7 to your computer and use it in GitHub Desktop.
Save zefei/c00a5adacbf237e3a1b7 to your computer and use it in GitHub Desktop.
Using Angular and Meteor together: templates (pre Meteor 0.8)
// for Meteor < 0.8.0
// load Template.* into $templateCache
angular.module('myApp')
.run(['$templateCache', function($templateCache) {
angular.forEach(Template, function(render, name) {
// Meteor uses Template to store its own templates, too
// Your template file shouldn't start with _ to avoid conflict
if (name[0] !== '_') $templateCache.put(name, render());
});
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment