Use multiple classes in ui-sref-active
Hi,
When I use multiple classes in an ui-sref-active directive I get the following error in console:
[$parse:syntax] Syntax Error: Token 'class2' is an unexpected token at column 8 of the expression [class1 class2] starting at [class2].
AngularJS version: 1.3.20 UI-Router version: 0.2.16 Provided plunker: http://plnkr.co/edit/4y0KC38Vlnc57wy6owW9
+1 This bug is kicking my ass right now.
I checked the documentation and this still looks like it should work:
http://angular-ui.github.io/ui-router/site/#/api/ui.router.state.directive:ui-sref-active
[edit] It seems to be the $scope.$eval added in the following commit.
Wow, this looks like a legit regression. Sorry about that. Thanks for the report, I'll patch it up shortly.
I've been working on a simple fix. A try/catch around the $scope.$eval will work. Was just about to write a test and submit a PR.
Hah, that's basically what I just did. If you beat me to it, great. :smile:
PR Submitted. Feel free to do with it as you wish :smile:
Merged. I'll push a release shortly.
Done: https://github.com/angular-ui/ui-router/releases/tag/0.2.17
Amazing. Thanks for the quick turnaround.
Happy to help. :smile:
@kmcarpenter could you please submit a PR for this one for 1.0.0alpha0 as well? It has the same issue, if you can't I'll do it. Thanks!