Router

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

The Router

Constructors

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

Types

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

Functions

Link copied to clipboard
fun clearHistoryAndNavTo(uri: String)

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
fun navBack()

Navigates to the previous route, when this is possible.

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

Navigates to the route.

fun navToUri(uri: String)

Navigates 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.Match)
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
fun resolveCurrentRoute()

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

Properties

Link copied to clipboard
val current: Stream<ActiveRoute>

Public readonly stream with the current ActiveRoute

Link copied to clipboard
val history: Stream<Router.History>