[elm-discuss] Re: Using Navigation - is Events.onWithOptions required?

2016-11-25 Thread Simon
You should 
read https://groups.google.com/forum/#!topic/elm-discuss/KacB1VqkVJg too
There are clearly 2 ways to achieve the same goal. Brian's is the one you 
get to if you build up from just the Basics library, while you might go 
Wouter's way if you bake in the Navigation library from the outset.




On Saturday, 26 November 2016 01:08:01 UTC+1, OvermindDL1 wrote:
>
> I actually prefer to have anchor tags around the document but have a top 
> level catch that stops page movements to url's I whitelist and instead just 
> redirects navigation (which then updates other parts of the app), seems the 
> most simple, but it is definitely not wrapped up in an easy way in elm yet 
> (and mine is in javascript...).
>
> On Wednesday, November 23, 2016 at 4:41:02 PM UTC-7, Wouter In t Velt 
> wrote:
>>
>> Op woensdag 23 november 2016 23:52:54 UTC+1 schreef Brian Marick:
>>>
>>> So I suspect I’m doing something wrong. Am I?
>>>
>>
>> Not wrong, I guess, but it is kind of a peculiar setup.
>>
>> I also use elm-lang/navigation, and never ran into this issue.
>> After checking my code:
>>
>>- Either I use an `a [ href "#/path/location ]` to let the url-parser 
>>navigate when the user clicks the link.
>>- Or I use `button [ onClick (NavigateTo NewLocation) ]` to go to the 
>>update function.
>>
>> (urlUpdate and update are wired so that navigation instructions can come 
>> in through either function).
>>
>> So it seems kind of double to use both the href and the onClick on the 
>> same element to do navigation.
>>
>

-- 
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 elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[elm-discuss] Re: Using Navigation - is Events.onWithOptions required?

2016-11-25 Thread OvermindDL1
I actually prefer to have anchor tags around the document but have a top 
level catch that stops page movements to url's I whitelist and instead just 
redirects navigation (which then updates other parts of the app), seems the 
most simple, but it is definitely not wrapped up in an easy way in elm yet 
(and mine is in javascript...).

On Wednesday, November 23, 2016 at 4:41:02 PM UTC-7, Wouter In t Velt wrote:
>
> Op woensdag 23 november 2016 23:52:54 UTC+1 schreef Brian Marick:
>>
>> So I suspect I’m doing something wrong. Am I?
>>
>
> Not wrong, I guess, but it is kind of a peculiar setup.
>
> I also use elm-lang/navigation, and never ran into this issue.
> After checking my code:
>
>- Either I use an `a [ href "#/path/location ]` to let the url-parser 
>navigate when the user clicks the link.
>- Or I use `button [ onClick (NavigateTo NewLocation) ]` to go to the 
>update function.
>
> (urlUpdate and update are wired so that navigation instructions can come 
> in through either function).
>
> So it seems kind of double to use both the href and the onClick on the 
> same element to do navigation.
>

-- 
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 elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[elm-discuss] Re: Using Navigation - is Events.onWithOptions required?

2016-11-23 Thread Wouter In t Velt
Op woensdag 23 november 2016 23:52:54 UTC+1 schreef Brian Marick:
>
> So I suspect I’m doing something wrong. Am I?
>

Not wrong, I guess, but it is kind of a peculiar setup.

I also use elm-lang/navigation, and never ran into this issue.
After checking my code:

   - Either I use an `a [ href "#/path/location ]` to let the url-parser 
   navigate when the user clicks the link.
   - Or I use `button [ onClick (NavigateTo NewLocation) ]` to go to the 
   update function.

(urlUpdate and update are wired so that navigation instructions can come in 
through either function).

So it seems kind of double to use both the href and the onClick on the same 
element to do navigation.

-- 
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 elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.