Route

interface Route<T>

A Route is an abstraction for routes which needed for routing

Parameters

T

type to de-/serialize from

Inheritors

Properties

Link copied to clipboard
abstract val default: T

Gives the default value when initialising the routing

Functions

Link copied to clipboard
abstract fun deserialize(hash: String): T

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

Link copied to clipboard
abstract fun serialize(route: T): String

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