Hey everyone, I'm working on developing a collapsible panel using Angular. The panel should consist of a header and body to display the content. The desired behavior is that when a button is clicked, the content collapses down, and clicking the same button again will close it up. If a second button is clicked, it should collapse the content for that button while closing the content from the first button. Essentially, I want it to function like a collapsible panel in Bootstrap but built solely with Angular. I have made some progress so far, but as I am new to Angular, any help would be greatly appreciated...
<body ng-app="app">
<div ng-controller="Test" class="container">
<div class="custom">
<button ng-click="show = 1" class="btn">Collapse 1</button>
<button ng-click="show = 2" class="btn">Collapse 2</button>
<div class="form-group" ng-show="show==1">
<div class="sec">Showing content for Collapse 1</div>
</div>
<div class="form-group" ng-show="show==2">
<div class="sec">Showing content for Collapse 2</div>
</div>
<div class="form-group" ng-show="show==3">
</div>
</div>
</div>
</body>