Skip to content

Instantly share code, notes, and snippets.

@zonak
Created November 18, 2013 14:20
Show Gist options
  • Save zonak/7528518 to your computer and use it in GitHub Desktop.
Save zonak/7528518 to your computer and use it in GitHub Desktop.
Ember params
/*
DEBUG: -------------------------------
DEBUG: Ember : 1.2.0-beta.3
DEBUG: Ember Data : 1.0.0-beta.2
DEBUG: Handlebars : 1.1.2
DEBUG: jQuery : 1.9.1
DEBUG: -------------------------------
*/
// ...
Router.map(function() {
this.resource('section', { path: '/section/:ms' }, function () {
this.resource('items', { path: ':vfilters/:vid' }, function () {
});
});
});
// ...
var ItemsRoute = Ember.Route.extend({
model: function (params, transition) {
console.log('??', transition.params);
}
});
// console output
// ?? Object {vfilters: "0", vid: "0", ms: "2"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment