RouterBuilder

class RouterBuilder

Helper class for building a Router

Constructors

Link copied to clipboard
fun RouterBuilder()

Functions

Link copied to clipboard
fun build(): Router
Link copied to clipboard
fun catchAll(view: FlowContent.(Route.Match) -> Unit)

Mounts a fallback route that matches any pattern.

Link copied to clipboard
fun disabled()

Creates a router that is disabled from the beginning

Link copied to clipboard
fun enable()

Creates a router that is enabled from the beginning

Link copied to clipboard
fun mount(route: Route, view: FlowContent.(Route.Match) -> Unit)

Mounts a route and associates it with the given view.

Link copied to clipboard
fun using(vararg wares: RouterMiddleware, scope: RouterBuilder.() -> Unit)

Uses one or multiple RouterMiddlewares.