open class MapRoute(val default: Map<String, String> = emptyMap()) : 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. At the start of the route is only a # instead of ?.



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


Link copied to clipboard
fun MapRoute(default: Map<String, String> = emptyMap())


Link copied to clipboard
open override fun deserialize(hash: String): Map<String, String>

Deserializes the window.location.hash to the given type T after the hashchange-event is fired.

Link copied to clipboard
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.hash


Link copied to clipboard
open override val default: Map<String, String>