Skip to content

Commit 4b02639

Browse files
committed
Merge pull request seiyria#129 from makzee/master
Adding support for AMD & CommonJS.
2 parents 0cb37e4 + 42c9a70 commit 4b02639

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

slider.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
(function(factory) {
2+
if (typeof define === 'function' && define.amd) {
3+
define(['angular', 'bootstrapSlider'], factory);
4+
} else if (typeof module === 'object' && module.exports) {
5+
module.exports = factory(require('angular'), require('bootstrapSlider'));
6+
} else if (window) {
7+
factory(window.angular, window.Slider);
8+
}
9+
})(function (angular, Slider) {
10+
111
angular.module('ui.bootstrap-slider', [])
212
.directive('slider', ['$parse', '$timeout', '$rootScope', function ($parse, $timeout, $rootScope) {
313
return {
@@ -219,3 +229,4 @@ angular.module('ui.bootstrap-slider', [])
219229
};
220230
}])
221231
;
232+
});

0 commit comments

Comments
 (0)