Passing A Dynamic Parameter Different Than Xyz_id Using LinkTo In Ember.js
I've seen a lot of examples of passing dynamic parameters which end with xyz_id being passed where xyz is the 'model'. However, is there a way to pass an id different than xyz_id?
Solution 1:
I figured it out. Had to implement the serialize method on the router:
serialize: function(model, params) {
return {
code: model.code,
type: model.type,
id: model.id
};
}
and of course, update the according path:
this.resource('video', {
path: '/video/:type/:code'
});
Post a Comment for "Passing A Dynamic Parameter Different Than Xyz_id Using LinkTo In Ember.js"