I have a route.
import Ember from 'ember';
export default Ember.Route.extend({
model : function (params) {
return Ember.RSVP.hash({
eventTypes : this.store.find('event-type'),
game : this.store.find('game', params.game_id)
});
},
setupController : function (controller, model) {
controller.set('game', model.game);
controller.set('eventTypes', model.eventTypes);
}
});
When I first visit this route all is well. The models get loaded and I can access game and eventTypes from my template. If I am to transition away from this route and then revisit the route both eventTypes
and game
are undefined. Why would the route transition with out error and return undefined models?
Aucun commentaire:
Enregistrer un commentaire