Answer the question
In order to leave comments, you need to log in
How to determine the active tab?
Hello everyone!)
There is such a structure.
<div class="tabbable">
<ul class="nav nav-tabs catalog" id="main-tab">
<li class="catalog active">
<a href="#/catalog/" class="catalog" data-target="#catalog" data-toggle="tab">
<span class="tab_catalog"></span>
Каталог сервисов
</a>
</li>
<li class="favorites">
<a href="#/favorites" class="a_favorites" data-target="#favorites" data-toggle="tab">
<span class="tab_favorites"></span>
Избранное
</a>
</li>
<li class="applications"">
<a href="#/applications" class="a_applications" style="height: 20px;
padding-right: 0;
padding: 13px 0px 0px 14px;" data-target="#applications" data-toggle="tab">
<span class="tab_applications"></span>
Статусы заявок
<span class="tab_task">
1
</span>
</a>
</li>
</ul>
<div class="tab-content service-catalog">
<ng-view></ng-view>
</div>
</div>
catalogControllers.controller('TabController', ['$scope', '$location', '$http', '$rootScope',
function($scope, $location, $http, $rootScope) {
$scope.isActive = function(viewLocation)
{
console.log(viewLocation);
console.log($location);
return viewLocation === $location.path();
};
}]);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question