I'm building an Elm application and am trying to add navigation as per the manual.
I've added the required handling of LinkClicked
and UrlChanged
and they work fine for href
, but they don't work for buttons that lead to different pages.
For example, in my search page:
...
, Input.button [ centerX ] -- This doesn't trigger a navigation message
{ onPress = Just StartSearch
, label = text "Search"
}
, Element.link [] -- This triggers a navigation message
{ label = text "Search"
, url = "/search"
}
...
How do I apply navigation changes when buttons are clicked?