Skip to content
@ng-doc/app / Class

NgDocRouteActiveDirective

Adds classes to its host element while the router URL matches a link.

<a [ngDocRouteActive]="'/docs/getting-started'" activeClass="active">Getting started</a>
Decorators
@Directive
Selectors
[ngDocRouteActive]
DeclarationTypeScript
@Directive({ … })
export class NgDocRouteActiveDirective { … }

Members

Properties

5
activeClass: InputSignal<string | string[]>
readonly input()

Class or classes to add while the link is active.

classes: Signal<string[]>
protectedreadonly
—
isActive: Signal<boolean>
readonly

Whether the link is active.

readonly input()

How the link is matched against the router URL.

Symbol
Kind
Class
Decorators
@Directive
Selectors
[ngDocRouteActive]
Scope
@ng-doc/app
Edit this page