Search code examples
javascriptember.jsember-rails

What am I missing from my initial attempt at getting default routes to work in ember?


Currently, the console says none of the templates can be found, and yet, when I console.log Ember.Templates, they are all there.

What is going on? I've been googling for hours. (I'm new to ember, so, I'm probably searching incorrectly due to not knowing all the nomenclature yet... but seriously... this should work out of the box, yeah?)

here is a picture of what I'm experiencing:

enter image description here (sorry for large size)


Solution

  • Your template names are nested, but shouldn't be. The application template shouldn't have app/application in front of it etc.

    foo/bar would represent a resource.route

    App.Router.map(function(){
      this.resource('foo', function(){
        this.route('bar');
      });
    });