When I go to the template page associated with EnduserAnalyticsProfileAnalyticsRoute the model hook in this route file does not fire and I cant quite figure out why. I am trying to return some information in an RSVP.hash but I am not sure how to return this if my model hook does not fire.
(function() {
const { changeStartDate, changeEndDate } = Sw.Lib.RouteHelpers;
Sw.EnduserAnalyticsProfileAnalyticsRoute = Ember.Route.extend({
currentAccount: service(),
profileAnalytics: Ember.inject.service(),
model: function(params) {
debugger
const id = this.get('currentAccountService.account.id')
console.log("IN MODEL HOOK1")
const profileView = this.get('profileAnalytics').analytics(id).then((result) => {
console.log("IN MODEL HOOK")
return result;
});
const view = "test"
return Ember.RSVP.hash([profileView, view]);
},
setupController(controller, hash) {
controller.setProperties(hash);
},
actions: {
changeStartDate: changeStartDate,
changeEndDate: changeEndDate,
},
});
})
Aucun commentaire:
Enregistrer un commentaire