Many Html pages in an Ember Application

Hello,

  Till now I met some Ember examples which use only index.html page , where we can have many templates. 

  So I am wondering if it is possible to have more than one html page.  If Ember will detecte then automatically to search
  for templates or we need to declare them  ?

Thank you.

Maxim

Yes, it is possible to store all your templates as separate files in some folder.

You can precompile templates automatically in one file using grunt-ember-templates Grunt plugin. In combination with grunt-contrib-watch you can make it update templates automatically as soon as you edit them.

For more advanced users (in my opinion), there is generator-ember Yeoman generator that does handles complete application build process including templates, minification and style compiling.

Thank you I will see that.

Is it possible to do it without Grunt? I tried Grunt based process once and it made everything very slow.

There is ember-precompile command line utility, but I haven’t used it recently, so I am now sure if it still works well.

You can also give a try to ember-cli (github), but is not just for templates, it will set up whole ember environment, similar to Yeloman’s generator-ember, but without Grunt.

A good alternative to using grunt for your build process is broccoli. It boasts super fast compile times (often less than a second), and already has quite a few plugins to handle the more common tasks like concatenation, minifying, CSS preprocessing and template precompilation. While it’s still in beta, it’s definitely worth checking out.

https://github.com/joliss/broccoli

Well, in this case we should mention another popular Grunt alternative: Gulp :slight_smile: