I am using a modal to display a series of tabs using
<div class="modal fade hide modal-creator" data-backdrop="static" modal="imageUploader" tabindex="-1" data-focus-on="input:first">
<div class="modal-header">
<h3>Create New Gallery</h3>
</div>
<div class="modal-body" id="imageUploader_sort">
<tabset>
<tab ng-repeat="tab in tabs" active="tab.active" heading="{{tab.title}}" disabled="tab.disabled" select="tabName(tab.title)">
<div ng-include="tab.content"></div>
</tab>
</tabs>
</div><!-- /modal-body -->
<div class="modal-footer">
<button ng-click="close()" class="btn" >Close</button>
<button ng-click="next()" class="btn" >Next</button>
</div>
Controller
$scope.tabs = [
{ title:"Home", content:"/beta/application/views/images/uploader/create.html", active: true },
{ title:"Upload", content:"/beta/application/views/images/uploader/upload.html"},
{ title:"Edit", content:"/beta/application/views/images/uploader/edit.html"}
];
$scope.next = function()
{
console.log($scope.tabs);
};
I am looking to create a solution to navigate through the tabs with a next button and when I reach the last page, turn the button into a finished button. Any guidance on this a great help Thanks
scope.tabIndex = 0;. Then you can access and increment this value from your$scope.next()function with no need to pass it in.$scope.tabIndexor click the next button twice. Check out this plunker.