I want to define a route like the following:
App.Router.map(function(){
this.resource('clip', {path: ':slug'}, function(){
this.route('settings');
});
});
When trying to either visit /some-slug
or /some-slug/settings
, the params
object return empty.
App.ClipIndexRoute = Em.Route.extend({
model: function(params){
alert(params.slug);
return {};
}
})
Why is that happening? And, more important, what can I do to make it work?
Here’s an sample app replicating this issue: http://jsbin.com/jomuva