Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
fix(slider): slider default value in ng-repeat corrected.
Browse files Browse the repository at this point in the history
Thanks @sonnylazuardi
Closes #479
  • Loading branch information
ThomasBurleson committed Oct 31, 2014
1 parent ddd977d commit b652d86
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/slider/slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,11 @@ function SliderController(scope, element, attr, $$rAF, $window, $mdEffects, $mdA
ngModelCtrl.$setViewValue( minMaxValidator(stepValidator(value)) );
}
function ngModelRender() {

if (isNaN(ngModelCtrl.$viewValue)) {
ngModelCtrl.$viewValue = ngModelCtrl.$modelValue;
}

var percent = (ngModelCtrl.$viewValue - min) / (max - min);
scope.modelValue = ngModelCtrl.$viewValue;
element.attr('aria-valuenow', ngModelCtrl.$viewValue);
Expand Down

0 comments on commit b652d86

Please sign in to comment.