angularjs - how to have a tab be open by default with angular and bootstrap -


Currently I have two tabs, I can open any by clicking on it, but I want to be opened first Default.

  & lt; Ul class = "nav nav-tabs" & gt; & Lt; Li ng-class = "{active: activeTab == 'execution'}" & gt; & Lt; One ng-click = "Active tab = 'implementation' '> & gt; Implementation & lt; / a & gt; & lt; / li & gt; & lt; li ng-class =" {active: activeTab ==' video ' } "& Gt; & lt; an ng-click =" ActiveTab = 'video' "& gt; Video & lt; / a & gt; & lt; / li & gt; & lt; / ul & gt; & lt; ; Div ng- show = "activeTab == 'implementation'"> gt; & lt; h4 & gt; test heading & lt; / h4 & gt; & lt; / div & gt; & lt; div ng-show = "ActiveTab == 'video'"> gt; & lt; h4 & gt; test heading & lt; / h4 & gt; & lt; / div & gt;   

any suggestions ?

What about the start of activation?

  & lt; ul class = "nav nav-tabs" ng-init = "activeTab = 'implementation'" & gt; & lt; li ng-class = "{active: activeTab == 'execution'}" & gt; ; & Lt; an ng-click = "active tab = 'implementation' '& gt; Implementation & lt; / A & gt; & Lt; / li & gt; & Lt; Li ng-square = "{active: activeTab == 'video'}" & gt; & Lt; One ng-click = "active tab = 'video'" & gt; Video & lt; / A & gt; & Lt; / li & gt; & Lt; / Ul & gt;    

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -