I need to use 'relativeTo' property as well as 'routerLinkActive' directive in my application. Having a click listener function that routes using
router.navigate(this.router.navigate(['path']{relativeTo:this.route});
would be okay. But in that case I cannot use the routerLinkActive directive.
How can I simultaneously use both?
RelativeTo is by default set to currently activated route. In template you can use .
or ^
in route name.
More about relative navigation:
https://stackoverflow.com/a/38808116/1356669
https://angular.io/guide/router#relative-navigation