package router
- Alphabetic
- By Inheritance
- router
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
final
case class
AbsUrl(value: String) extends PathLike[AbsUrl] with Product with Serializable
An absolute URL.
- sealed trait Action[P] extends Product with Serializable
-
final
case class
BaseUrl(value: String) extends PathLike[BaseUrl] with Product with Serializable
The prefix of all routes on a page.
The prefix of all routes on a page.
The router expects this to be a full URL. Examples:
BaseUrl("http://www.blah.com/hello"),BaseUrl.fromWindowOrigin / "hello". -
final
case class
Path(value: String) extends PathLike[Path] with Product with Serializable
The portion of the URL after the BaseUrl.
- abstract class PathLike[Self <: PathLike[Self]] extends AnyRef
- sealed trait Redirect[P] extends Action[P]
- final case class RedirectToPage[P](page: P, method: Method) extends Redirect[P] with Product with Serializable
- final case class RedirectToPath[P](path: Path, method: Method) extends Redirect[P] with Product with Serializable
- final case class Renderer[P](f: (RouterCtl[P]) ⇒ VdomElement) extends Action[P] with Product with Serializable
-
final
case class
Resolution[P](page: P, render: () ⇒ VdomElement) extends Product with Serializable
Result of the router resolving a URL and reaching a conclusion about what to render.
Result of the router resolving a URL and reaching a conclusion about what to render.
- page
Data representation (or command) of what will be drawn.
- render
The render function provided by the rules and logic in RouterConfig.
- sealed abstract class RouteCmd[A] extends AnyRef
- type Router[P] = component.Js.ComponentWithRoot[Unit, Nullary, Unmounted[Unit, Resolution[P], Backend], Box[Unit], Nullary, JsUnmounted[Unit, Resolution[P], Backend]]
- case class RouterConfig[Page](parse: (Path) ⇒ Parsed[Page], path: (Page) ⇒ Path, action: (Path, Page) ⇒ Action[Page], renderFn: (RouterCtl[Page], Resolution[Page]) ⇒ VdomElement, postRenderFn: (Option[Page], Page) ⇒ Callback, logger: Logger) extends Product with Serializable
-
final
class
RouterConfigDsl[Page] extends AnyRef
DSL for creating RouterConfig.
DSL for creating RouterConfig.
Instead creating an instance of this yourself, use RouterConfigDsl.apply.
-
abstract
class
RouterCtl[A] extends AnyRef
Router controller.
Router controller. A client API to the router.
- A
A data type that indicates a route that can be navigated to.
-
final
class
RouterLogic[Page] extends Broadcaster[Unit]
Performs all routing logic.
Performs all routing logic.
- Page
Routing rules context. Prevents different routing rule sets being mixed up.
- type RouterM[P] = MountedWithRoot[Id, Unit, Resolution[P], Backend, Unit, Resolution[P]]
- type RouterU[P] = UnmountedWithRoot[Unit, MountedImpure[Unit, Resolution[P], Backend], Box[Unit], JsMounted[Unit, Resolution[P], Backend]]
Value Members
- object AbsUrl extends Serializable
- object BaseUrl extends Serializable
- object Path extends Serializable
- object Redirect extends Serializable
- object RouteCmd
- object Router
- object RouterConfig extends Serializable
- object RouterConfigDsl
- object RouterCtl
-
object
StaticDsl
This is not meant to be imported by library-users; RouterConfigDsl is the entire library-user-facing facade & DSL.