cbrake
1
Hi,
I’m learning https://www.elm-spa.dev and find it very helpful to understanding how to set up multi-page apps in Elm.
I do have one question – if I want to access data in the global model in a page view, how do I do that?
For example:
only the page model is passed into the view. Is there any way to access the global model, or am I thinking about this wrong?
Thanks,
Cliff
cc: @RyanNHG
1 Like
G4BB3R
2
Remove the always function from line 41, then you have access to PageContext and can use the view this way:
view : Utils.Spa.PageContext → Model → Element Msg
view { global, route, queryParameters } model =
cbrake
3
ahh yes, and it is documented, which I missed:
Thanks a lot!
system
Closed
4
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.