Browse Source

#195: + amd

requirejs
RubaXa 10 years ago
parent
commit
bb09bb423a
  1. 20
      ng-sortable.js

20
ng-sortable.js

@ -2,11 +2,21 @@
* @author RubaXa <trash@rubaxa.org>
* @licence MIT
*/
angular.module('ng-sortable', [])
.constant('$version', '0.3.2')
.directive('ngSortable', ['$parse', function ($parse) {
(function (factory) {
'use strict';
if (window.angular && window.Sortable) {
factory(angular, Sortable);
}
else if (typeof define === 'function' && define.amd) {
define(['angular', 'sortable'], factory);
}
})(function (angular, Sortable) {
'use strict';
angular.module('ng-sortable', [])
.constant('$version', '0.3.2')
.directive('ngSortable', ['$parse', function ($parse) {
var removed;
function getSource(el) {
@ -116,5 +126,5 @@ angular.module('ng-sortable', [])
}
}
};
}])
;
}]);
});

Loading…
Cancel
Save