serialize (model, params) Objectpublic
Defined in packages/ember-routing/lib/system/route.js:1566
A hook you can implement to convert the route's model into parameters for the URL. App.Router.map(function() {
this.route('post', { path: '/posts/:post_id' });
});
App.PostRoute = Ember.Route.extend({
model: function(params) {
// the server returns `{ id: 12 }`
return Ember.$.getJSON('/posts/' + params.post_id);
},
serialize: function(model) {
// this will make the URL `/p