<div ng-controller = "tab.ctrl">
<span ng-click = "activeIndex = 1" ng-class = "{tend:activeIndex==1}">tab标题1</span>
<span ng-click = "activeIndex = 2" ng-class = "{tend:activeIndex==2}">tab标题2</span>
</div>
<div>
<a ng-show = "activeIndex==1"></a>
<a ng-show = "activeIndex ==1"></a>
</div>
ctrl:function(){
that.$scope.activeIndex = 1;
} //简要代码