@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#
readonlybase:string
Defined in: node_modules/@jupyterlab/application/lib/router.d.ts:17
The base URL for the router.
Implementation of#
Inherited from#
Router.base
commands#
readonlycommands:CommandRegistry
Defined in: node_modules/@jupyterlab/application/lib/router.d.ts:21
The command registry used by the router.
Implementation of#
Inherited from#
Router.commands
stop#
readonlystop: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#
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#
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#
Inherited from#
Router.routed
Methods#
addTransformer()#
addTransformer(
transformer):void
Defined in: packages/application/src/router.ts:53
Add a URL transformer
Parameters#
transformer#
Returns#
void
Implementation of#
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#
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#
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#
Inherited from#
Router.route