File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -4,9 +4,8 @@ angular.module('ui.bootstrap-slider', [])
44 restrict : 'AE' ,
55 replace : true ,
66 template : '<input type="text" />' ,
7- link : function ( $scope , element , attrs ) {
8- var model = $parse ( attrs . ngModel ) ;
9-
7+ require : 'ngModel' ,
8+ link : function ( $scope , element , attrs , ngModelCtrl ) {
109 $ . fn . slider . Constructor . prototype . disable = function ( ) {
1110 this . picker . off ( ) ;
1211 }
@@ -58,10 +57,10 @@ angular.module('ui.bootstrap-slider', [])
5857 }
5958
6059 var slider = $ ( element [ 0 ] ) . slider ( options ) ;
61- var updateEvent = attrs . updateEvent || 'slide' ;
60+ var updateEvent = attrs . updateEvent || 'slide' ;
6261
6362 slider . on ( updateEvent , function ( ev ) {
64- model . assign ( $scope , ev . value ) ;
63+ ngModelCtrl . $setViewValue ( ev . value ) ;
6564 $timeout ( function ( ) {
6665 $scope . $apply ( ) ;
6766 } ) ;
You can’t perform that action at this time.
0 commit comments