I'm dynamically generating a list of elements - the first loop is the list of tabs for the menu, the second list is the div with the tab contents. If I write it statically it works, but as is, it's not allowing tabs to work.
here is the view (cshtml):
<div ng-app="project" >
<div class="project-tab-menu ui right secondary menu" style="margin-right:1em;">
<a class="item" data-tab={{Tab.ViewName}} ng-repeat="Tab in vm.TabData">{{Tab.DisplayName}}</a>
</div>
<div ng-repeat="TabContent in vm.TabData" class="ui bottom attached tab segment no-border" data-tab={{TabContent.ViewName}} >
<div ng-include= TabContent.Url></div>
</div>
</div>
<hr />
<script>
$('.item').tab();
</script>
I have tried adding this to my controller to delay loading JQuery's tab function till the DOM is ready. That didn't work.
angular.element(document).ready(function () {
$('.item').tab();
});
The structure looks correct (from referencing a working static page with this functionality) when I look at it through dev tools in chrome.
Again, if I remove the angular directives then it works just fine, but I need this to work dynamically.
Any suggestions?