lwr-router-container
A router container provides navigation context by processing all navigation wires and events from its descendants in the DOM.
| Property | Type | Required/Optional | Description |
|---|---|---|---|
router | Router object | Optional | Obtained from the createRouter() API. |
history-disabled | Boolean | Optional | Set history-disabled to true if your router container shouldn't alter the browser's History API during navigation events or location changes. |
A router container fires these events:
-
onhandlenavigation- Dispatched when
navigate(pageRef)is called.event.preventDefault()cancels the navigation event.event.detailis thePageReference.
- Dispatched when
-
onprenavigate-
Dispatched when a navigation event is received and a
RouteDefinitionmatch is found.event.preventDefault()cancels the navigation event.event.detailis aRouteChangeobject.
-
-
onpostnavigate-
Dispatched when a navigation event has completed.
event.detailis aDomRoutingMatchobject for the current location.
-
-
onerrornavigate-
Dispatched when there's an error processing a navigation event. (For example, no
RouteDefinitionmatch or aprenavigatecancellation.)event.detailis aMessageObject.
-
See Also