Router

class Router(mountedRoutes: List<MountedRoute>, enabled: Boolean)

The Router

Constructors

Link copied to clipboard
constructor(mountedRoutes: List<MountedRoute>, enabled: Boolean)

Types

Link copied to clipboard
data class History(val router: Router, val entries: List<ActiveRoute>)

Properties

Link copied to clipboard

Public readonly stream with the current ActiveRoute

Link copied to clipboard

Functions

Link copied to clipboard

Navigates to the given uri while clearing the navigation history.

Link copied to clipboard
fun disable()
Link copied to clipboard
fun enable()
Link copied to clipboard

Checks if there is a route for the given uri.

Link copied to clipboard
fun navBack()

Navigates to the previous route, when this is possible.

Link copied to clipboard

Navigates to the current uri of the browser

Link copied to clipboard
fun navToUri(route: Route.Match)

Navigates to the route.

fun navToUri(uri: String)

Navigates to the given uri.

fun navToUri(uri: String, newTab: Boolean)
fun navToUri(uri: String, target: String? = null)
fun navToUri(uri: String, evt: MouseEvent)

Navigate to the given uri.

fun navToUri(route: Route, routeParams: Map<String, String>, queryParams: Map<String, String>)

Navigates to the route by filling in the given routeParams and queryParams.

Link copied to clipboard
fun replaceUri(route: Route, routeParams: Map<String, String>, queryParams: Map<String, String>)

Replaces the current uri without changing the browser history.

fun replaceUri(uri: String)

Replaces the current uri with changing the history

Link copied to clipboard

Tries to resolve the next ActiveRoute by looking at the browser current location.