I just now changed the route structure in ember-cli and violated my application. I wanted to put my current structure one level deeper ...
Before:
Router.map(function() {
this.resource('placements', function() {
this.route('add');
this.route('import');
this.route('open');
});
this.route('admin');
});
After:
Router.map(function() {
this.resource('portal', function() {
this.resource('placements', function() {
this.route('add');
this.route('import');
this.route('open');
});
this.route('admin');
});
});
I also need to change the structure of the template ...
Before:
- templates/
- placements/
- add.hbs
- import.hbs
- index.hbs
- open.hbs
- admin.hbs
- application.hbs
- index.hbs
- placements.hbs
After:
- templates/
- portal/
- placements/
- add.hbs
- import.hbs
- index.hbs
- open.hbs
- admin.hbs
- index.hbs
- placements.hbs
- application.hbs
- index.hbs
- portal.hbs
I thought I made all the changes 1 to 1, but for some reason, when I restarted the ember server, the routes of the nested "placements" are broken.
In the console log, I noticed that ember is still trying to find placements.indexunder the old templates/placements/indexand not with the new directory.
, , ? , renderTemplate hook, ... , ... , - , ?