<body ng-app="workApp">
<div ng-controller="firstClaimController">
<input type="checkbox" ng-click="sbcfunction()"> Option 1
<input type="checkbox" ng-click="sbcfunction()"> Option 2
<input type="checkbox" ng-click="sbcfunction()"> Option 3
<input type="checkbox" ng-click="sbcfunction()"> Option 4
{{myValue}}
</div>
<script type="text/javascript" >
var claimController = angular.module('workApp', []);
claimController.controller('firstClaimController', function($scope){
// Test the controller whether it works
$scope.myValue = "asdf";
//
$scope.sbcfunction = function () {
};
});
</script>
The above is my code and i got 4 checkboxes. The aim is Option 1 is single select and Options 2-4 are multi-select. If Option 1 is selected, Option 2-4 should be deselected automatically. If Option 2-4 are selected Option 1 should be deselected.
Looking for a better solution with angularjs.