I use $ stateProvider here's the code:
.state('books', { url: '/main', controller: 'MainCtrl'}) .state('books.home', { url: '/home', controller: 'HomeCtrl'}) .state('books.about', { url: '/about', controller: 'AboutCtrl'}) I wrote a directive in which the following code:
<li ui-sref-active="active"><a ui-sref="books">main</a></li> <li ui-sref-active="active"><a ui-sref="books.home">home</a></li> <li ui-sref-active="active"><a ui-sref="books.about">about</a></li> The problem is that ui-sref = "books" always has the class active, even if I switch to home or about. How to make it so that this class is not assigned to the parent state?