문제

일련의 체크 박스가 있습니다.

 <input type="checkbox" ng-change="??????">
.

$ scope.mode.SomeOtherValue= false 을 설정해야합니다.

ng-change 에서 확인란의 값을 얻을 수있는 방법이 있으므로 $ scope.mode.SomeotherValue 의 값을 설정할 수 있습니다.

도움이 되었습니까?

해결책

시도 :

html;

<input type="checkbox" ng-model="CheckValue" ng-true-value="true" ng-false-value="false" ng-change="valueChanged()">
.

js;

$scope.valueChanged = function(){
  if($scope.CheckValue == true){
    $scope.mode.someOtherValue = false;
  }else{
    $scope.mode.someOtherValue = true;
  }
}
.

도움이되기를 바랍니다 ...!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top