There is this somewhat dirty hack you could use:  
Supply a one-liner of javascript to an Elm style attribute. Using 
`attribute` from the `Html.Attributes` library.

You could make your own helper that does the redirect:

    redirectTo : String -> Attribute msg
    redirectTo destinationUrl =
      attribute 
        "onclick" 
        ("window.location.href = ' ++ destinationURL ++ "'")


Which you can add to any element like this:

    button 
      [ class "mdl-button", redirectTo "https://google.com"; ]
      [ text "Click to leave" ]

I posted the same answer just now over on SO.


-- 
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.

Reply via email to