角度标签更改新值?
<ul class="nav nav-tabs">
<li class="active">
<a class="A" data-target="#A">Nye({{c.data.feil_nye_ant}})</a>
</li>
<li class="nav">
<a class="B" data-target="#B">Aktive({{c.data.feil_aktive_ant}})</a>
</li>
<li class="nav">
<a class="C" data-target="#C">HASTER({{c.data.feil_haster_ant}})</a>
</li>
<li class="nav">
<a class="D" data-target="#D">Ferdige({{c.data.feil_ferdig_ant}})</a>
</li>
</ul>
当更新c.data.feil_haster_ant
的值时,需要通过打开“HASTER”选项卡(表示“紧急”)来绘制焦点。
答案 0 :(得分:1)
您可以使用ng-class
激活标签页。在选项卡上执行事件(如单击)时,请使用ng-class
设置某个条件的值以触发该选项卡的css更改。
<强> HTML 强>:
<ul class="nav nav-tabs">
<li class="active" ng-class="{'active': Some condition}">
<a class="A" data-target="#A">Nye({{c.data.feil_nye_ant}})</a>
</li>
<li class="nav" ng-class="{'active': Some condition}">
<a class="B" data-target="#B">Aktive({{c.data.feil_aktive_ant}})</a>
</li>
<li class="nav" ng-class="{'active': Some condition}">
<a class="C" data-target="#C">HASTER({{c.data.feil_haster_ant}})</a>
</li>
<li class="nav" ng-class="{'active': Some condition}">
<a class="D" data-target="#D">Ferdige({{c.data.feil_ferdig_ant}})</a>
</li>
</ul>
<强> CSS 强>:
.active{
your css styles for active tab
}