• Overview
@angular/router

isActive

function
stablesince v21.1

Returns a computed signal of whether the given url is activated in the Router.

API

function isActive(  url: string | UrlTree,  router: Router,  matchOptions: IsActiveMatchOptions,): Signal<boolean>;

isActive

Signal<boolean>

Returns a computed signal of whether the given url is activated in the Router.

As the router state changes, the signal will update to reflect whether the url is active.

@paramurlstring | UrlTree
@paramrouterRouter
@parammatchOptionsIsActiveMatchOptions
@returnsSignal<boolean>

Description

Returns a computed signal of whether the given url is activated in the Router.

As the router state changes, the signal will update to reflect whether the url is active.

Jump to details