$scope.percentages=JSON.parse(JSON.stringify(values));//Copy of the object in order to keep original values in $scope.percentages in parent controller.
varformatToPercentage=function(value){
returnvalue+'%';
};
$scope.percentages.normal.options={
floor:0,
ceil:100,
translate:formatToPercentage,
showSelectionBar:true
};
$scope.percentages.range.options={
floor:0,
ceil:100,
translate:formatToPercentage
};
$scope.ok=function(){
$modalInstance.close($scope.percentages);
};
$scope.cancel=function(){
$modalInstance.dismiss();
};
},
resolve:{
values:function(){
return$scope.percentages;
}
}
});
modalInstance.result.then(function(percentages){
$scope.percentages=percentages;
});
modalInstance.rendered.then(function(){
$rootScope.$broadcast('rzSliderForceRender');//Force refresh sliders on render. Otherwise bullets are aligned at left side.
$scope.percentages=JSON.parse(JSON.stringify(values));//Copy of the object in order to keep original values in $scope.percentages in parent controller.
$scope.formatToPercentage=function(value){
returnvalue+'%';
};
$scope.ok=function(){
$modalInstance.close($scope.percentages);
};
$scope.cancel=function(){
$modalInstance.dismiss();
};
},
resolve:{
values:function(){
return$scope.percentages;
}
}
});
modalInstance.result.then(function(percentages){
$scope.percentages=percentages;
});
modalInstance.rendered.then(function(){
$rootScope.$broadcast('rzSliderForceRender');//Force refresh sliders on render. Otherwise bullets are aligned at left side.