Hello, I am currently using the rzmodule/rzslider in AngularJS. However, after changing the slider to a specific range, the ng-modal is not returning the updated value. It keeps returning the initial value of 10000 that was configured initially.
$scope.slider = {
value: 10000,
options: {
floor: 0,
ceil: 100000,
step: 1000,
minLimit: 1000,
maxLimit: 100000
}
};
Here is the HTML code snippet:
<h1 class="selected-amt"><i class="fa fa-rupee"></i> {{slider.value}}</h1>
<rzslider rz-slider-model="slider.value"
rz-slider-options="slider.options"></rzslider>
The value displayed in {{slider.value}} updates correctly on the screen. However, when trying to access the updated value by clicking on a button and calling $scope.slider.value in the controller, it always returns the initial value of 10000 even though I have moved the slider to 20000.
In my controller, I have the following function to retrieve the updated value:
$scope.getvalue=function(){
console.log($scope.slider.value)//should return changed value but giving 10000 always
}
If anyone has any suggestions or solutions, please let me know. Thank you!