我正在写小问题。
滑块有指令ng-show =" showSliderL"或ng-show =" showSliderC"。
功能:
它返回true或false(可能在这里我有问题)。
我有值组合框:" rl"和" rc"。 如何影响组合框的值以影响滑块的外观和隐藏?
这是我的组合框选择功能代码:
现在两个滑块都被隐藏了。
代码:
var myApp = angular.module('myapp', ['rzModule']);
myApp.controller('TestController', TestController);
$scope.obwody = ['RL', 'RC'];
$scope.wybranyObwod = $scope.obwody[0];
$scope.wybierzFunkcje = function () {
var wybor = $scope.wybranyObwod;
if (angular.equals('RL', wybor)) {
$scope.sliderL.isHidden = false;
$scope.sliderC.isHidden = true;
} else if (angular.equals('RC', wybor)) {
$scope.sliderC.isHidden = false;
$scope.sliderL.isHidden = true;
} else {
console.log('idot');
}
}
$scope.wybierzFunkcje();