@jupyterlite


@jupyterlite / @jupyterlite/application / LiteRouter

Class: LiteRouter#

Defined in: packages/application/src/router.ts:44

A custom router that extends the standard Router with URL transformation capabilities

Extends#

  • Router

Implements#

Constructors#

Constructor#

new LiteRouter(options): LiteRouter

Defined in: packages/application/src/router.ts:45

Parameters#

options#

IOptions

Returns#

LiteRouter

Overrides#

Router.constructor

Properties#

base#

readonly base: string

Defined in: node_modules/@jupyterlab/application/lib/router.d.ts:17

The base URL for the router.

Implementation of#

ILiteRouter.base

Inherited from#

Router.base


commands#

readonly commands: CommandRegistry

Defined in: node_modules/@jupyterlab/application/lib/router.d.ts:21

The command registry used by the router.

Implementation of#

ILiteRouter.commands

Inherited from#

Router.commands


stop#

readonly stop: Token<void>

Defined in: node_modules/@jupyterlab/application/lib/router.d.ts:34

If a matching rule’s command resolves with the stop token during routing, no further matches will execute.

Implementation of#

ILiteRouter.stop

Inherited from#

Router.stop

Accessors#

current#

Get Signature#

get current(): ILocation

Defined in: node_modules/@jupyterlab/application/lib/router.d.ts:25

Returns the parsed current URL of the application.

Returns#

ILocation

The parsed current URL of the application.

Implementation of#

ILiteRouter.current

Inherited from#

Router.current


routed#

Get Signature#

get routed(): ISignal<this, ILocation>

Defined in: node_modules/@jupyterlab/application/lib/router.d.ts:29

A signal emitted when the router routes a route.

Returns#

ISignal<this, ILocation>

A signal emitted when the router routes a route.

Implementation of#

ILiteRouter.routed

Inherited from#

Router.routed

Methods#

addTransformer()#

addTransformer(transformer): void

Defined in: packages/application/src/router.ts:53

Add a URL transformer

Parameters#

transformer#

IURLTransformer

Returns#

void

Implementation of#

ILiteRouter.addTransformer



register()#

register(options): IDisposable

Defined in: node_modules/@jupyterlab/application/lib/router.d.ts:50

Register to route a path pattern to a command.

Parameters#

options#

IRegisterOptions

The route registration options.

Returns#

IDisposable

A disposable that removes the registered rule from the router.

Implementation of#

ILiteRouter.register

Inherited from#

Router.register


reload()#

reload(): void

Defined in: node_modules/@jupyterlab/application/lib/router.d.ts:54

Cause a hard reload of the document.

Returns#

void

Implementation of#

ILiteRouter.reload

Inherited from#

Router.reload


route()#

route(): Promise<void>

Defined in: node_modules/@jupyterlab/application/lib/router.d.ts:62

Route a specific path to an action.

Notes#

If a pattern is matched, its command will be invoked with arguments that match the IRouter.ILocation interface.

Returns#

Promise<void>

Implementation of#

ILiteRouter.route

Inherited from#

Router.route