Encoding and decoding are partial functions. Their partial-ness should be symmetrical, otherwise you'll end up with a route that can parse a URL into a Page but can't encode the page into the same URL (or vice versa)
Encoding and decoding are partial functions. Their partial-ness should be symmetrical, otherwise you'll end up with a route that can parse a URL into a Page but can't encode the page into the same URL (or vice versa)
- Type Params
- Args
- Type of data saved in the URL for pages matched by this route Note: the Route might match only a subset of args of this type.
- Page
- Types of pages that this Route is capable of matching. Note: the Route might match only a subset of pages of this type.
- Value Params
- decodePF
- Decode Args into Page, if args are valid
- matchEncodePF
- Match Any to Page, and if successful, encode it into Args
- Companion
- object
class Object
trait Matchable
class Any
Value members
Concrete methods
- Value Params
- origin
- typically dom.window.location.origin.get e.g. "http://localhost:8080"
- Throws
- Exception
when url is not absolute or is malformed
- Value Params
- origin
- typically dom.window.location.origin.get e.g. "http://localhost:8080"
- Throws
- Exception
when url is not relative