Reputation: 319
I'm trying to implement a Drag&Drop system. I've found an amazing one : http://marceljuenemann.github.io/angular-drag-and-drop-lists/demo/#/nested Github: https://github.com/marceljuenemann/angular-drag-and-drop-lists/issues
Now, it says load "dndLists" into my Dependency - So my app looks like this:
var app = angular.module('clarus_app', ['ngRoute'], ['dndLists'] );
but then it crashes.
angular.js:116 Uncaught Error: [$injector:modulerr] Failed to instantiate module clarus_app due to: Error: [ng:areq] Argument 'fn' is not a function, got string
No idea what I'm doing wrong.
The controller the page uses looks like this:
app.controller("logCtrl", ['$scope','$location','$http', function($scope, $location, $http){
Any help? any idea?
Thanks in advance.
Upvotes: 0
Views: 178
Reputation: 171679
You have 2 different array arguments for module dependency and only want one array containing all dependencies
Change
var app = angular.module('clarus_app', ['ngRoute'], ['dndLists'] );
To
var app = angular.module('clarus_app', ['ngRoute','dndLists'] );
// ^^ single array of dependent module names
Upvotes: 0