I'm trying to integrate navigation
<http://package.elm-lang.org/packages/elm-lang/navigation/1.0.0/> into my
app. I'm using
Navigation.program
instead of
Html.program
It seems with Navigation.program that a result param is now being passed
into init. Previous to this change I was initializing my app like so
init : ( Model, Cmd Msg )
init =
update Initialize
({ editorText = exampleSlides
, markdown = ""
, slidesText = Array.empty
, currentSlide = 0
, mode = Edit
, keycode = 0
}
)
I'm moving 'mode' out into the route eventually. I was trying something
like
init result =
urlUpdate result "edit" Initialize
({ editorText = exampleSlides
, markdown = ""
, slidesText = Array.empty
, currentSlide = 0
, keycode = 0
}
)
"edit" being the route I want to start with. So I'm having trouble figuring
out how to init the model and call the first route that will set the model.
Can someone point me in the right direction?
Here is the not working code on a branch
https://github.com/ronnross/razzle-dazzle/tree/navigation.
Thanks
--
You received this message because you are subscribed to the Google Groups "Elm
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.