Find the component for a given path.
the matched component along with
path parameters, or undefined if no component could be found.
The path to match against.
Register a route for a component.
path pattern used to match a component. For more information about URL patterns read MDN Web Docs.
Name of the component to register for the specified pattern
The RouteRegistry service lets you register new locations in the application specified by either a path or a path pattern. Once a location has been registered, it can be navigated to using the Navigator service.
When registering a route, any parameters in the path will be used as props on the component when it is being rendered. Parameters will be of type
string, when the parameter can be parsed as a number the type will instead benumber. Components that are registered in the RouteRegistry should implement RouteComponent.Note
Since components are assumed to implement RouteComponent some parameters can not be used as path parameters and some will have special meaning. Special handling will be used for parameters named
limetypeandidto create a LimeWebComponentContext for the component.idcan be used on it's own, but will be used to createcontextiflimetypeis also present. The following should not be used since they are part of RouteComponent:platformcontextqueryhashstateExample
Example
Example