Request params not available all over sub-route


#1

I’m trying to do this:

Router.map(function () {
  this.route('dashboard', {path: '/dashboard/:uid'}, function () {
    this.route('pbx', function () {
      this.route('numbers', {path: '/numbers'});
    });
});

:uid is available in dashboard route:

export default Ember.Route.extend({
  model: function(params) {
    console.log(params);
    return this.store.query('workspace', {user: params.uid});
  }

});

Inside numbers route this returns empty mode:

export default Ember.Route.extend({
  model: function() {
    return this.store.modelFor('workspace');
  }

});

#2

Seems issues was trying to get modelFor called on store return this.store.modelFor(‘workspace’);