StringRoute

open class StringRoute(val default: String = "") : Route<String>

StringRoute is a simple Route which serializes and deserializes nothing.

Parameters

default

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

Constructors

Link copied to clipboard
constructor(default: String = "")

Properties

Link copied to clipboard
open override val default: String

Functions

Link copied to clipboard
open override fun deserialize(hash: 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: String): String

Serializes a given object of type T to String for setting it to the window.location.hash