<ul>
<ling-click="tab=1">item1</li>
<ling-click="tab=2">item2</li>
<ling-click="tab=3">item3</li>
</ul>
<divng-if="tab==1"></div>
<divng-if="tab==2"></div>
<divng-if="tab==3"></div>
app.run(function($rootScope){
$rootScope.tab=1;//default
})
原文链接:https://www.f2er.com/angularjs/149470.html