简体   繁体   中英

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:

在此处输入图片说明 (sorry for large size)

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');
  });
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM