AFAIK this isn't supported directly. As a workaround you could add a directive that checks if the class router-link-active
is set and depending on that add/remove your custom class.
@Directive({
selector: '[routerLink]')
export class RouterLinkReplaceClass {
// add class `my-active` when `myActiveClass` is `true`
@HostBinding('class.my-active')
// read `router-link-active` class state
@Input('class.router-link-active')
myActiveClass: bool = false;
}
Plunker example
To use it just add it to the directives of the parent component.
(not tested)