I have a button group with three buttons: left, middle, and right. I want to enhance this functionality so that when any of the main buttons are clicked, the corresponding sub-buttons (left-sub, middle-sub, or right-sub) appear accordingly:
<div class="btn-group">
<label class="btn btn-primary" ng-model="checkModel.left" btn-checkbox>Left</label>
<label class="btn btn-primary" ng-model="checkModel.left-sub" btn-checkbox>Left-Sub</label>
<label class="btn btn-primary" ng-model="checkModel.middle" btn-checkbox>Middle</label>
<label class="btn btn-primary" ng-model="checkModel.middle-sub" btn-checkbox>Middle-Sub</label>
<label class="btn btn-primary" ng-model="checkModel.right" btn-checkbox>Right</label>
<label class="btn btn-primary" ng-model="checkModel.right-sub" btn-checkbox>Right-Sub</label>
<label class="btn btn-primary" ng-model="checkModel.right-sub-2" btn-checkbox>Right-Sub-2</label>
</div>
I'm new to angularJS and struggling to implement this feature. Any sample code or guidance would be greatly appreciated.