Ember.js 余烬模型挂钩未被调用
当我转到与EnduserAnalyticsProfileAnalyticsRoute关联的模板页面时,该路由文件中的模型钩子不会触发,我也不太明白为什么。我试图在RSVP.hash中返回一些信息,但是如果我的模型钩子没有触发,我不确定如何返回这些信息Ember.js 余烬模型挂钩未被调用,ember.js,Ember.js,当我转到与EnduserAnalyticsProfileAnalyticsRoute关联的模板页面时,该路由文件中的模型钩子不会触发,我也不太明白为什么。我试图在RSVP.hash中返回一些信息,但是如果我的模型钩子没有触发,我不确定如何返回这些信息 (function() { const { changeStartDate, changeEndDate } = Sw.Lib.RouteHelpers; Sw.EnduserAnalyticsProfileAnalyticsRoute =
(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,
},
});
})
你如何进入路线?重要提示:如果您提供的模型(对象或数组)带有