Skip to content

Commit 293a66f

Browse files
committed
Merge pull request seiyria#38 from kou/support-angularjs-1.3-and-bootstrap-slider-4.0
Support AngularJS 1.3 and bootstrap-slider 4.0
2 parents 828d5ec + 01fab2e commit 293a66f

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

slider.js

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,14 @@ angular.module('ui.bootstrap-slider', [])
2222
initSlider();
2323

2424
function initSlider() {
25-
26-
if (attrs.ngChange) {
27-
ngModelCtrl.$viewChangeListeners.push(function () {
28-
$scope.$apply(attrs.ngChange);
29-
});
30-
}
31-
32-
$.fn.slider.Constructor.prototype.disable = function () {
25+
$.fn.slider.constructor.prototype.disable = function () {
3326
this.picker.off();
3427
};
3528

36-
$.fn.slider.Constructor.prototype.enable = function () {
29+
$.fn.slider.constructor.prototype.enable = function () {
3730
this.picker.on();
3831
};
3932

40-
if (attrs.ngChange) {
41-
ngModelCtrl.$viewChangeListeners.push(function () {
42-
$scope.$apply(attrs.ngChange);
43-
});
44-
}
45-
4633
var options = {};
4734
if ($scope.sliderid) options.id = $scope.sliderid;
4835
if ($scope.min) options.min = parseFloat($scope.min);

0 commit comments

Comments
 (0)