andrApp.controller('tabsMenu', ['$scope',
function tabsMenu($scope) {
$scope.tab = 0;
$scope.settingsMenu = [
{
id: 0,
name: 'Фотоальбом',
desc: 'Загрузить/Удалить'
},
{
id: 1,
name: 'Я',
desc: 'Основные настройки'
},
{
id: 2,
name: 'Я путешественник',
desc: 'Настройка путешествий'
}
];
$scope.setTab = function(id, $index) {
$scope.showTab = id;
};
}])
<section>
<article ng-controller="tabsMenu" class="ng-tab">
<ul>
<li ng-repeat="item in settingsMenu" ng-class="{active:showTab === $index}" ng-click="setTab(item.id, $index)">
<p>[[item.name]]</p>
<p ng-show="showTab === $index">[[item.desc]]</p>
</li>
</ul>
</article>
</section>
<div ng-controller="tabsMenu" ng-init="tab = 3; settingsMenu" class="ng-tab">
<ul>
<li ng-repeat="item in settingsMenu" ng-class="{active:tab === settingsMenu[$index].id }"
ng-click="tab = settingsMenu[$index].id">
<p>{{item.name}}</p>
<p ng-show="tab === $index">{{ item.desc }}</p>
</li>
</ul>
</div>