So I\'ve set up a router and some routes, and this works for the most part. when I load #/contacts/123 (or whatever) the ContactIndexRoute returns an empty params object.
Params are only passed to route which defines the slug. Meaning if you define a slug on the resource it only exists on the resource, and not its routes. If it's defined on a route under a resource it only lives on that route.
CallMonitor.ContactRoute = Ember.Route.extend({
model: function(params){
return this.store.find('contact', params.contact_id);
},
renderTemplate: function(){
this._super(this, arguments);
this.render('contact', {
outlet: 'points',
into: 'contacts',
controller: 'contactsIndex'
})
},
setupController: function(controller, contact) {
controller.set('contact', contact);
}
});