Type-safe navigation helpers.
These work with the Route.Router and Effect types to provide
navigation using route values instead of raw strings.
-- In an update function:
( model, Navigation.navigateTo router (BlogPost 42) )
-- In a view function:
Navigation.link router (BlogPost 42) [ class "blog-link" ] [ text "Read" ]Navigate to a route without adding to browser history.
Create a link element that navigates via the SPA router.
Navigation.link router (BlogPost 42) [ class "blog-link" ] [ text "Read post" ]
-- Renders: <a href="/blog/42">Read post</a>
-- With click handler that prevents default navigation
Navigate to a route (adds to browser history).