简体   繁体   中英

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM