Unavailable. Nobody can download this version any more, with elm or with the Lamdera compiler: github.com/rob-sokolowski/elm-spa is gone (deleted or private); Software Heritage not asked yet (this run's --swh-calls were used up); no fork with tag 1.0.0 found (60 same-name repos checked); no cached copy. Use another version.
Every page gets access to a request, which has information about the current URL, route parameters, query parameters etc.
page : Shared.Model -> Request Params -> Page Model Msg
page _ request =
Page.element
{ init = init
, update = update
, view = view request
}You can choose to pass this request into init,update, or any other function
that might need access to URL-related information.
A convenience function for creating requests, used by elm-spa internally.
request : Request Route { name : String }
request =
Request.create (Route.fromUrl url)
{ name = "ryan" }
url
key
Here is an example request for the route
/people/:nameAnd another example with a some query parameters: