Open quide opened 8 years ago
If I am not wrong about understanding your question, you want to know whether angular-dragula requires requireJS
as dependency or not. The answer is NO. Angular-Dragula doesn't require requireJS.
I am using angular-dragula for last 2 months in angular project. As far as I know requireJS and angular have own (and different on purpose) dependency management mechanism. Reference
I am using angular-dragula without requireJS and its working almost fine. I use kind of following code view.html
<body ng-app="app" ng-controller="MyController">
<ul dragula="'bag-name'" dragula-model="items">
<li ng-repeat="item in items" ng-bind="item"></li>
</ul>
</body>
app.js
angular
.module("app", [angularDragula(angular)]);
.controller("MyController", function ($scope) {
$scope.items = ['name1', 'name2', 'name3'];
});
And maybe Dragula Team will fix dragula-scope and dragula-model sections examples on thei doc. The dragula
, dragula-model
and dragula-scope
attributes will go on the parent ul
elements in their example to actually make the li
elements draggable.
Yep I get errors when dropping if unless I add the dragula-*
attrs to the parent ul
.
Hi,
I'm very noob into this, so maybe my question doesn't make much sense, but anyway, here goes: Does angular-dragula needs requirejs to operate? If so, why isn't it automatically installed when doing bower install? (I'm trying to get this to work on an ionic project) It seems that in ionic js must be imported at
. In your description, this may be a problem. Can you detail the problem(s) that may occur?Thanks in advance!