2014-10-02 65 views
1

我正在使用AngularJS和Sails进行项目工作。试图运行Web应用程序,我发现了以下错误:使用AngularJS时出错:“Diff is not defined”

ReferenceError: diff is not defined 
at http://localhost:1337/js/angular-sails-bind.js:108:38 
at Object.fn (http://localhost:1337/js/dependencies/angular.min.js:117:478) 
at k.$digest (http://localhost:1337/js/dependencies/angular.min.js:119:35) 
at k.$apply (http://localhost:1337/js/dependencies/angular.min.js:121:460) 
at http://localhost:1337/js/angular-sails-bind.js:180:28 
at c.serverResponded (http://localhost:1337/js/dependencies/sails.io.js:362:11) 
at c.onPacket (http://localhost:1337/js/dependencies/sails.io.js:2:20375) 
at d.onPacket (http://localhost:1337/js/dependencies/sails.io.js:2:16703) 
at c.onPacket (http://localhost:1337/js/dependencies/sails.io.js:2:10676) 
at c.onData (http://localhost:1337/js/dependencies/sails.io.js:2:10413) 

我尝试更新和使用最新版本的角度,并没有什么的。任何人都知道是什么原因?

+1

看来,DIFF没有定义。 – durbnpoisn 2014-10-02 19:17:27

回答

0

已解决,该函数位于库的新版本中,位于“dist”目录中。对不起,

功能:

function diff(arr1, arr2) { 
return arr1.filter(function (i) { 
    return arr2.indexOf(i) < 0; 
}); 
} 
相关问题