Angular JS safari(MAC OSX)错误:[$ injector:modulerr]

时间:2015-10-05 21:43:37

标签: angularjs safari facebook-javascript-sdk facebook-login

最近我在我的角度JS Web项目中添加了facebook login函数。在localhost上,一切都像魅力(在所有浏览器上)。上传后发生错误,但仅限于Safari(Mac OS X)。 Chrome,Firefox和iOS Safari按预期工作。

    Failed to instantiate module myApp due to:
[$injector:modulerr] http://errors.angularjs.org/1.4.5/$injector/modulerr?p0=f...
http://myApp.myDomain.com/bower_components/angular/angular.min.js:6:421
http://myApp.myDomain.com/bower_components/angular/angular.min.js:38:100
n@http://myApp.myDomain.com/bower_components/angular/angular.min.js:7:326
g@http://myApp.myDomain.com/bower_components/angular/angular.min.js:37:181
http://myApp.myDomain.com/bower_components/angular/angular.min.js:37:350
n@http://myApp.myDomain.com/bower_components/angular/angular.min.js:7:326
g@http://myApp.myDomain.com/bower_components/angular/angular.min.js:37:181
eb@http://myApp.myDomain.com/bower_components/angular/angular.min.js:40:436
d@http://myApp.myDomain.com/bower_components/angular/angular.min.js:19:383
yc@http://myApp.myDomain.com/bower_components/angular/angular.min.js:20:180
Zd@http://myApp.myDomain.com/bower_components/angular/angular.min.js:19:2
http://myApp.myDomain.com/bower_components/angular/angular.min.js:292:53
fire@http://myApp.myDomain.com/bower_components/jquery/dist/jquery.js:3148:35
fireWith@http://myApp.myDomain.com/bower_components/jquery/dist/jquery.js:3260:11
ready@http://myApp.myDomain.com/bower_components/jquery/dist/jquery.js:3472:24
completed@http://myApp.myDomain.com/bower_components/jquery/dist/jquery.js:3503:15

1 个答案:

答案 0 :(得分:0)

解决:显然只有Safari在从bower目录加载Facebook登录JS文件的url路径出现问题。改变它的工作路径后。我不知道为什么每个其他浏览器在Safari出现问题时都能正确获取路径,因此根本原因仍然不明确。