Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ember.js/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ember.js 余烬模型挂钩未被调用_Ember.js - Fatal编程技术网

Ember.js 余烬模型挂钩未被调用

Ember.js 余烬模型挂钩未被调用,ember.js,Ember.js,当我转到与EnduserAnalyticsProfileAnalyticsRoute关联的模板页面时,该路由文件中的模型钩子不会触发,我也不太明白为什么。我试图在RSVP.hash中返回一些信息,但是如果我的模型钩子没有触发,我不确定如何返回这些信息 (function() { const { changeStartDate, changeEndDate } = Sw.Lib.RouteHelpers; Sw.EnduserAnalyticsProfileAnalyticsRoute =

当我转到与EnduserAnalyticsProfileAnalyticsRoute关联的模板页面时,该路由文件中的模型钩子不会触发,我也不太明白为什么。我试图在RSVP.hash中返回一些信息,但是如果我的模型钩子没有触发,我不确定如何返回这些信息

(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,
    },
  });
})
  

你如何进入路线?重要提示:如果您提供的模型(对象或数组)带有