In some case I got an issue with the routing url. Here's my router :
contacts: Em.Route.extend({
route: '/contacts',
index: Em.Route.extend({
route: '/',
connectOutlets: function(router, context) {
App.contactsController.populate()
var appController = router.get('applicationController');
appController.connectOutlet('contactsList');
}
}),
show: Em.Route.extend({
route: '/:contactid',
connectOutlets: function(router, context) {
alert('show contact');
}
}),
doShowContact: function(router, event){
router.transitionTo('show', {contactid: event.context.id});
}
}),
When I enter inside doShowContact, if I specify 'contactid' as context and '/:contactid' as route inside 'show', I'll get for example '/contacts/3' in the browser url, everything is ok.
However in doShowContact, if I specify 'contact_id' rather than 'contactid' as context and '/:contact_id' rather than '/:contactid' as route. I'll get '/contacts/undefined' in the browser url.
Is there a way to explain it ? Thanks!