【发布时间】:2015-03-31 17:21:48
【问题描述】:
我有两个通过 Ember cli 简单身份验证使用 Simple-Auth 的 Ember 1.11 项目。两者中较简单的一个(基本的 hello world 应用程序)工作得很好......事实上它工作得很好(简单的身份验证非常棒)。但是,另一个(最近升级的应用程序)有某种初始化错误。
我的错误是:
Error while processing route: receiving.index Cannot read property 'on' of undefined TypeError: Cannot read property 'on' of undefined
它在这一行的 beforeModel 函数中的 ApplicationRouteMixin 中中断:
_this.get(Configuration.sessionPropertyName).on(event, function(error) {
Array.prototype.unshift.call(arguments, event);
var target = routeEntryComplete ? _this : transition;
target.send.apply(target, arguments);
});
Configuration.sessionPropertyName 是“会话”,它显然找不到它。我无法在这个项目之外重新创建它,因此感谢您提供任何帮助。
山姆
【问题讨论】:
-
您更新了 Simple Auth 吗?
-
我已经尝试过 0.7.3 和 master 分支。错误仍然存在于两者中。
-
你之前用的是什么版本?
-
我刚刚开始合并 simple-auth,所以这是我的第一个版本。
-
你能用你的整个文件创建一个要点吗? gist.github.com
标签: ember.js ember-simple-auth