Optional
options: { fallback?: BaseRouteConfig }Protected
Readonly
childProtected
currentProtected
currentProtected
currentOptional
fallbackA default fallback route which will always be matched if none of the routes match. Implicitly matches to the path "/*".
Protected
Readonly
hostProtected
onCallback to call when this controller is disconnected.
It's critical to call this immediately in hostDisconnected so that this controller instance doesn't receive a tail match meant for another route.
Protected
parentProtected
previousStatic
Readonly
baseStatic
baseProtected
Static
Readonly
navProtected
Static
Readonly
onProtected
Static
previousProtected
Static
Readonly
routeProtected
Static
Readonly
routingProtected
Static
Readonly
searchThe current parsed route parameters.
Protected
getMatches url
against the installed routes and returns the first match.
Navigates this routes controller to pathname
.
This does not navigate parent routes, so it isn't (yet) a general page
navigation API. It does navigate child routes if pathname matches a
pattern with a tail wildcard pattern (/*
).
Returns a URL string of the current route, including parent routes,
optionally replacing the local path with pathname
.
Optional
pathname: stringProtected
onProtected
onProtected
onThe result of calling the current route's render() callback.
Static
addStatic
addStatic
removeStatic
removeStatic
wait
Custom implementation of lib-labs/router Router class.
Adds the ability to add navigation and search listeners.
A root-level router that installs global event listeners to intercept navigation.
This class extends
Routes
so that it can also have a route configuration.There should only be one Router instance on a page, since the Router installs global event listeners on
window
anddocument
.Nested routes should be configured with the
Routes
class.