I have a nest route for goals which is setup as such:
this.resource('clients', function() {
this.route('new');
this.route('client', { path: '/:id' }, function() {
this.route('profile');
this.route('sessions');
this.route('payments');
this.route('goals', function() {
this.route('show', {path: '/:id' });
this.route('new');
});
this.route('messages');
});
});
Going to the index route of Goals works fine where I have a defined goals.hbs
and goals/index.hbs
templates but only a goals.js
controller. You can see this setup from the Ember inspector here:
The problems, however, show up if:
- I add a explicit
goals/index.js
controller rather than relying on the auto-generated one - I navigate to the "clients.client.goals.new" or "clients.client.goals.show" routes.
In all cases the error is effectively the same. In order to be explicit, let's take the case where there is not a goals/index.js
controller but I navigate to "clients.client.goals.new". In this case I get the following error:
Error while processing route: clients.client.goals.new controller._updateCacheParams is not a function TypeError: controller._updateCacheParams is not a function
Very odd, I'm doing nothing fancy here. Really don't understand why I'd get this error. Any help would be greatly appreciated.
Aucun commentaire:
Enregistrer un commentaire