how to modularize ember.js templates? -


all examples on ember.js show templates being used in form of inline script tags within single large html file. there way separate templates in files of own , if best practices around it?

assuming we're focussing here on re-structuring front-end application , defining workflow javascript environment (ember.js , dependencies) there various tools allow that. suggest take @ grunt , yeoman

there several tutorials / github projects started.

to answer question regarding templates:

grunt has grunt-ember-templates plugin, capable of loading individual handlebars template files , compiling them single js (all handled grunt watcher).

the config below allows to split handlebars templates in app/templates while @ runtime compiled scripts/templates.js

ember_templates: {   compile: {     options: {       templatename: function(sourcefile) {         return sourcefile.replace(/app\/templates\//, '');       }     },     files: {       "<%= yeoman.app %>/scripts/templates.js": ["<%= yeoman.app %>/templates/**/*.handlebars"]     }   } }, 

Comments