Open akashihi opened 8 years ago
Works for me, although it doesn't generate new "ticks" if you have that option enabled.
<div ui-slider data-min="0" data-max="{{attributeCount - 1}}" data-step="1" data-tick ng-model="sliderValue"></div>
When I add new objects to my collection I update the count the data-max attribute uses. It didn't work when I set it to attributes.length so I added the watchCollection.
$scope.$watchCollection("attributes", function () { $scope.attributeCount = $scope.attributes.length; });
Is it possible to change max value when slider is already created and used?
I tried that approach:
[....skip...] $scope.slider.options.max = $scope.selectedQuant.maxValue
but it doesn't works.