Routing

open class Routing(root: String? = null, useHash: Boolean = true, strategy: Strategy = Strategy.ONE, noMatchWarning: Boolean = false, linksSelector: String? = null) : KVRouter

A helper class for Navigo 8+ JavaScript router.

Parameters

root

the root path of the application

useHash

whether to use hash based routing

strategy

a routing strategy

noMatchWarning

do not show warnings when there is no matching route

linksSelector

CSS links selector

Constructors

Link copied to clipboard
constructor(root: String? = null, useHash: Boolean = true, strategy: Strategy = Strategy.ONE, noMatchWarning: Boolean = false, linksSelector: String? = null)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun kvDestroy()

Shutdown router.

Link copied to clipboard
open override fun kvNavigate(route: String)

Navigate to the given path.

Link copied to clipboard
open override fun kvOff(handler: (Any) -> Unit)

Remove handler.

Link copied to clipboard
open override fun kvOn(route: String, handler: (Any) -> Unit): KVRouter

Add handler for a route.

Link copied to clipboard
open override fun kvResolve()

Resolve current route.