Have you seen the examples for elm-lang/navigation?

https://github.com/elm-lang/navigation/blob/master/examples/Counter.elm

I think it is easy to adapt this one for your needs.

If you want something more sophisticated you could use evancz/url-parser



On Mon, Jul 11, 2016 at 9:37 PM, William Bailey <[email protected]>
wrote:

> I have a feeling this is a really stupid question but here goes.  So I
> have this Elm card game app:
>
> deepfinesse.com/demo.html
>
> I'd like the card layout that shows up which is presently hardcoded in the
> Elm source to come from a URL param, ala:
>
> deepfinesse.com/demo.html?deal=AJ743.KQ2.7.984 (etc)
>
> I want to do this mostly so 3rd party WEB pages can HREF deals with above
> so that when the user clicks the link, up pops my app with that deal in
> place, ready to use/explore.
>
> So far this app is 100% Elm code, no custom javascript.  So it is built
> simply via:
>
> % elm make Main.elm --output demo.html
>
> How do I do this?  Can't seem to find the answer to this seemingly simple
> question.  Do I need to compile to demo.js instead, convert demo.html to be
> boilerplate wrapper HTML that includes demo.js in fullscreen mode, then use
> something like getParameterByName() in the javascript to communicate the
> deal into Elm via ports?  Gosh that seems like a lot of infrastructure to
> do a simple thing.
>
> Hopefully I'm just missing something?
>
> --
> 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.
>



-- 
There is NO FATE, we are the creators.
blog: http://damoc.ro/

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