Renamed to ryan-haskell/elm-spa. It is published under that name, and new versions come out there.
Versions published as ryannhg/elm-spa still install under that name. 13 versions of 13 come from the new location (see their notes).
Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/ryan-haskell/elm-spa.
What we checked: The repo moved to github.com/ryan-haskell/elm-spa. Rebuilt with git archive from commit c43bd5d738bc of https://github.com/ryan-haskell/elm-spa (zip prefix ryannhg-elm-spa-c2c1c0e/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 0f81cf7d3db236dc0585b6d7d3eefadaba6557e5.
The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.
Details · package.elm-lang.org's zip: https://github.com/ryannhg/elm-spa/zipball/5.3.0/
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: