<html lang="en" ng-app="birthdayApp">
<div class="container">
<div class="header">
<ul class="nav nav-pills pull-right">
<li ng-class="todayClass"><a href="#/today">Сегодня</a></li>
<li ng-class="tomorrowClass"><a href="#/tomorrow">Завтра</a></li>
<li ng-class="monthClass"><a href="#/month">Месяц</a></li>
<li ng-class="annivClass"><a href="#/anniversary">Юбилеи</a></li>
</ul>
<h3 class="text-muted">Дни рождения</h3>
</div>
</div> <!-- /container -->
...
<div ng-view></div>
</hrml>
Возможно ли вот эти классы ng-class="todayClass", ng-class="tomorrowClass", ng-class="monthClass", ng-class="annivClass" задавать из контроллера?
Сейчас каждую ссылку обрабатывает router:
birthdayApp.config(['$routeProvider',
function($routeProvider) {
$routeProvider.
when('/today', {
templateUrl: 'views/today.html',
controller: 'TodayBirthCtrl'
}).
when('/month', {
templateUrl: 'views/month.html',
controller: 'MonthBirthCtrl'
}).
when('/tomorrow', {
templateUrl: 'views/tomorrow.html',
controller: 'TomorrowBirthCtrl'
}).
when('/anniversary', {
templateUrl: 'views/anniversary.html',
controller: 'AnniversaryCtrl'
}).
otherwise({
redirectTo: '/today'
});
}]);