Last active
August 29, 2015 14:01
-
-
Save selvagsz/609bc36e7cfa24c893de to your computer and use it in GitHub Desktop.
Nested Route Url without nesting templates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var get = Em.get; | |
App.Router.map(function() { | |
this.route('something'); | |
this.route('somethingelse', {path: '/somethingelse/:foo_id/:bar_id/:baz_id'}); | |
}); | |
App.SomethingelseRoute = Em.Route.extend({ | |
model: function(params) { | |
//fetch the model | |
}, | |
serialize: function(model) { | |
return { | |
foo_id: get(model, 'foo_id'), | |
bar_id: get(model, 'bar_id'), | |
baz_id: get(model, 'baz_id') | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment