A context provided to route data loaders.
Creates a new ReadableSSRRouter instance.
A context provided to route data loaders.
Router options.
Instantly aborts the pending route loading for the rootController and its descendants.
Optional
reason: unknownThe abort reason that is used for rejection of the loading promise.
If there's an interceptedController then it is made a rootController. No-op otherwise.
Returns the array of matched routes and extracted params for a given location.
The location to match.
Looks up a route in routes that matches a location, loads its data and notifies subscribers.
A location or a route to navigate to.
Navigate options.
Returns an inline <script>
tag with source that hydrates the client with the state accumulated during SSR,
or an empty string if there are no state changes since the last time nextHydrationScript was called.
Returns a script source that hydrates the client with the state accumulated during SSR, or an empty string if there are no state changes since the last time nextHydrationScript was called.
Prefetches components and data of routes matched by a location.
A location or a route to prefetch.
An promise that can be aborted to discard prefetching.
Subscribes a listener to events published by a router.
A listener to subscribe.
A callback that unsubscribe a listener.
A context provided to route data loaders.
A component that is rendered when an error was thrown during route rendering.
A controller of the intercepted route, or null
if there's no intercepted route.
Readonly
isSSRtrue
if the router is used in the server environment.
What to render when a component or data are being loaded.
A component that is rendered when a route is being loaded.
The location of the latest router navigation.
A nonce string to allow hydration scripts under a
script-src
Content-Security-Policy.
A component that is rendered if notFound was called during route loading or rendering
Readonly
readableWhere the route is rendered.
A root controller rendered in a router Outlet, or null
if there's no matching route
or if navigation didn't occur yet.
Routes that a router can render.
Readonly
writableProvides a convenient, chainable way of piping this readable stream through a transform stream (or any other { writable, readable } pair). It simply pipes the stream into the writable side of the supplied pair, and returns the readable side for further use.
Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.
The streaming router that can be used as a transformer for Web Streams. It enqueues router hydration chunks into the after each chunk from the read side.