I am working on a tab system using ng-repeat to display tabs and content, but I'm facing some challenges in making it work seamlessly.
Below are the tabs being generated:
<ul class="job-title-list">
<li ng-repeat="tab in tabBlocks">
<a href="javascript:;" ng-click="activeTab($index)">dummy content</a>
</li>
</ul>
And here is the corresponding content for each tab:
<div ng-repeat="content in contentBlocks">
<p>more dummy content</p>
</div>
Additionally, I have a function that sets the selected tab index:
$scope.activeTab = function(i) {
$scope.selectedTab = i
console.log($scope.selectedTab)
}
I have been exploring options like ng-show, ng-switch, and ng-if to toggle the visibility of content based on the selected tab, but I haven't made much progress. Any suggestions or guidance would be greatly appreciated!
Thank you in advance!