Skip to main content

foundation-utils.routeutil

Home > @genesislcap/foundation-utils > RouteUtil

RouteUtil class​

A singleton utility to observe and notify about route changes. It uses both polling and popstate events to detect changes.

Signature:

export declare class RouteUtil 

Properties​

Property

Modifiers

Type

Description

pathName

string

The current pathname of the window location.

shared

static

readonly

RouteUtil

Gets the singleton instance of RouteUtil.

Methods​

Method

Modifiers

Description

destroy()

Clean up route detection listeners and polling.