Angular2 beta 9 has a new feature that adds "router-link-active" class to the activated menu item without configuration. > Feature: angular1_router: Add ng-link-active class to active ng-link (11e8aa2), closes #6882 you may want to deprecate the file.
Activity
PatrickJS commentedon Mar 13, 2016
that's for angular1
MurhafSousli commentedon Mar 13, 2016
@gdi2290 no it's for angular2, and I've tried it
https://github.com/angular/angular/blob/master/CHANGELOG.md
sasidhar commentedon Mar 14, 2016
@MurhafSousli You are correct.
We have "router-link-active" available in Angular 2 from 2.0.0-alpha.37 (2015-09-09)
I tried on my local machine and its working fine without router-active directive.
PatrickJS commentedon Mar 14, 2016
router link is fine. when you want the active class on the parent that's a problem
sasidhar commentedon Mar 14, 2016
@gdi2290 Ok.
Then we need
router-active.tsgoodmind commentedon Jul 28, 2016
@gdi2290 why it is removed? how can I set class on parent now?