mardi 9 août 2016

ember lost reference to model on reload

I have routes like this

Router.map(function() {
  this.route('about');
  this.route('rooms');
  this.route('room', { path: '/room/:uid' });

when I access /rooms I can see the room list. Then I click in one room and I'm redirected to /room/123 and everything works fine.
But if I reload the page on /room/123 the model become null.

This is the route for room:

export default Ember.Route.extend({
  model(params){
    this.store.findRecord('room', params.uid);
  }
});




Aucun commentaire:

Enregistrer un commentaire