angularjsangular-ui-bootstrapangularjs-bootstrap

angularjs bootstrap ui active tabs not loaded by default


i am using angularjs v1.5.5 and ui-bootstrap-tpls-1.3.2.
i loading page the dynamic. i have 3 pages. i want to load last page by default

  $scope.tabs = [
{ title:'Page A', template: 'a.html',  content:'' , loaded : false},
{ title:'Page B', template: 'b.html',  content:'', loaded : false },
{ title:'Page C', template: 'c.html', content:'', loaded : false, active : true }

];

My Sample Code Here


Solution

  • This was fairly simple.

    By default the active tab is set to the first index in the tabset. The active attribute on the uib-tabset was changed to the required tab number.

    <uib-tabset active="3">
    

    Here is the modified plunkr

    Source and Additional Read

    If you want to read more about the attributes and properties of Angular UI tabs, here is a link to the documentation for tabs