angularjsangular-dragula

Use angular dragula without requirejs ends in failing js tests


I have the same issue as described here: Using Angular Dragula without RequireJS

It works if do this:

var app = angular.module('app', [
  angularDragula(angular)
]);
<script src="node_modules/angularjs-dragula/dist/angularjs-dragula.js"></script>

But all the jasmine tests fail with: Error: ReferenceError: Can't find variable: angularDragula


Solution

  • Check your configuration file. You should have an array of file paths which includes angularjs-dragula.js, and the files must be ordered correctly (dependencies must come before the files that depend on them).