I\'m using AngularUI\'s routing and I\'d like to do a ng-class=\"{active: current.state}\" but I\'m unsure how to exactly detect the current state in a directiv
ng-class=\"{active: current.state}\"
If you are using ui-router, try $state.is();
You can use it like so:
$state.is('stateName');
Per the documentation:
$state.is ... similar to $state.includes, but only checks for the full state name.