I'm trying to create simple tabs using only divs with ng-show and ng-hide. I don't want to use jQuery or BootStrap. I have created the tabs but I cannot handle the divs correctly.
JS Fiddle
<div ng-app ng-controller="sample">
<div class="cb" ng-click="showDetails = ! showDetails">tab 1</div>
<div class="cb" ng-click="showDetails = ! showDetails">tab 2</div>
<div ng-hide="showDetails">
<p>first</p>
</div>
<div ng-show="showDetails">
<p>second</p>
</div>
Even if I click the first tab displays the content of the second tab. How can I display only the first content when I click the first tab and the second content when I click the second one?
Thank you in advance.
<kbd>tag.