vendredi 10 avril 2015

Ember.js nested routes with shared models

I have this on my router.js:



this.resource('campaigns', {path:'/campaigns'}, function() {
this.route('index', {path: '/'});
this.route('group', {path: '/*campaign_group_id'});
});


So it's a route called campaigns, and 2 nested routes: index and group.


When the browser is on the group route, I need to access the model from group route, on the campaigns route/controller.


But I can't access it. I always get the model that it's on campaigns.js route.





Aucun commentaire:

Enregistrer un commentaire