angularjs-滑块值不带逗号
angularjs-slider Values without commas
angularjs-slider 应该显示没有逗号的值,并且只在最小最大值上显示逗号值。
示例:[6.5, 7, 8, .... , 31, 31.5]
如果我设置
$scope.slider = {
value: 31.5,
options: {
floor: 6.5,
ceil: 31.5,
step: 1,
precision: 1
}
};
值为 [6.5、7.5、8.5 ... 31.5]
我该如何设置?
找到了:我必须设置 stepsArray
选项,我想要的值 select。
示例:
var myApp = angular.module('myapp', ['rzModule']);
myApp.controller('TestController', TestController);
function TestController() {
var vm = this;
vm.priceSlider = {
value: 31.5,
options: {
floor: 6.5,
ceil: 31.5,
step: 1,
precision: 1,
stepsArray: [6.5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 31.5]
}
}
}
angularjs-slider 应该显示没有逗号的值,并且只在最小最大值上显示逗号值。 示例:[6.5, 7, 8, .... , 31, 31.5]
如果我设置
$scope.slider = {
value: 31.5,
options: {
floor: 6.5,
ceil: 31.5,
step: 1,
precision: 1
}
};
值为 [6.5、7.5、8.5 ... 31.5]
我该如何设置?
找到了:我必须设置 stepsArray
选项,我想要的值 select。
示例:
var myApp = angular.module('myapp', ['rzModule']);
myApp.controller('TestController', TestController);
function TestController() {
var vm = this;
vm.priceSlider = {
value: 31.5,
options: {
floor: 6.5,
ceil: 31.5,
step: 1,
precision: 1,
stepsArray: [6.5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 31.5]
}
}
}