实际上,这非常简单,因为每个
pane公开了
active支持双向数据绑定的属性:
<tabs> <pane ng-repeat="pane in panes" heading="{{pane.title}}" active="pane.active"> {{pane.content}} </pane></tabs>然后可以轻松找到活动标签,例如:
$scope.active = function() { return $scope.panes.filter(function(pane){ return pane.active; })[0];};这是一个工作的小伙伴



