2017-07-13 119 views
1

我有在每個標籤不同的HTML頁面,我如果想記住上次使用的引導,如果可能的保持標籤上引導

<div> 
<ul class="nav nav-tabs"> 
    <li class="active"><a data-toggle="tab" href="#TypeSettings">Type</a></li> 
    <li><a data-toggle="tab" href="#EvidenceSettings">Evidence</a></li> 
    <li><a data-toggle="tab" href="#OverallTypeSettings">Overall Type</a></li> 
</ul> 

<div class="tab-content"> 
    <div id="TypeSettings" class="tab-pane fade in active"> 
     <div ng-include src="'Templates/AdminSettings/TypeSettings.html'"></div> 
    </div> 
    <div id="EvidenceSettings" class="tab-pane fade"> 
     <div ng-include src="'Templates/AdminSettings/EvidenceSettings.html'"></div> 
    </div> 
    <div id="OverallTypeSettings" class="tab-pane fade"> 
     <div ng-include src="'Templates/AdminSettings/OverallTypeSettings.html'"></div> 
    </div> 
</div> 

+0

請添加jsfiddle! –

回答

0

要激活的標籤主動甚至刷新後刷新開用戶打開標籤,然後你添加一些JS邏輯。例如,您可以將用戶上次打開的選項卡存儲在Cookie中。

+0

是的假設想要將其存儲在本地存儲中,可以幫助我使用角度控制器中的代碼 我不想包含任何額外的庫 –