标签:cli span active 切换 font 方法 nbsp htm lis
html:
<ul class="nav-list">
<li ng-class="{‘active‘ : current == 5}" ng-click="setCurrent(5)"><a ui-sref=".goodsManage" >商品管理</a></li>
<li ng-class="{‘active‘ : current == 6}" ng-click="setCurrent(6)"><a href="" >仓库签约</a></li>
<li ng-class="{‘active‘ : current == 7}" ng-click="setCurrent(7)"><a href="" >客户管理</a></li>
</ul>
js
//点击,样式变换
$scope.setCurrent = function(index){
$scope.current = index;
}
注: 其中 active 为点击后要添加上的样式
标签:cli span active 切换 font 方法 nbsp htm lis
原文地址:http://www.cnblogs.com/maochunyan/p/6709345.html