MapRoute

open class MapRoute(default: Map<String, String>) : Route<Map<String, String>>

MapRoute serializes and deserializes a Map to and from window.location.hash. It is like using url parameters with pairs of key and value. In the begin there is only a # instead of ?.

Parameters

default

Map to use when no explicit window.location.hash was set before

Constructors

MapRoute
Link copied to clipboard
js
fun MapRoute(default: Map<String, String>)
Map to use when no explicit window.location.

Functions

deserialize
Link copied to clipboard
js
open override fun deserialize(hash: String): Map<String, String>
Deserializes the window.location.
equals
Link copied to clipboard
js
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
js
open fun hashCode(): Int
serialize
Link copied to clipboard
js
open override fun serialize(route: Map<String, String>): String
Serializes a given object of type T to String for setting it to the window.location.
toString
Link copied to clipboard
js
open fun toString(): String

Properties

default
Link copied to clipboard
js
open override val default: Map<String, String>
Map to use when no explicit window.location.