I'm working on a project using AngularJS and Sails. Trying to run the webapp, I found the following error:
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)
I tried to update and use the latest version of Angle, and nothing. Anyone know what is the reason?
Solved, the function is in the new version of the library, in the "dist" directory. Sorry,
The function:
function diff(arr1, arr2) {
return arr1.filter(function (i) {
return arr2.indexOf(i) < 0;
});
}