There is a popup Help Messenger per-page (the elm app is inside the popup), so first it can be on any url, so "/" to "/module/something/whatever" and each url can have their own # due to their own local things, the help messenger applies its own hash based on the ticket they are accessing, the flag that would be passed in is the page prefix and postfix url, the url handler in elm should remove the prefix and the postfix before starting parsing and should add them back in anytime it sets. The app is working in a larger older environment that I cannot easily modify so it has to work within these constraints.
On Tuesday, September 13, 2016 at 12:48:59 PM UTC-6, Peter Damoc wrote: > > The reason I asked for the URL examples is because I wanted to understand > the nature of the dynamic part. > > I was curious if maybe the kind of need that you have from the parser > couldn't be solved without flags. > > Why couldn't you just trim the url in the parser function? > > > > > > On Tue, Sep 13, 2016 at 9:33 PM, OvermindDL1 <[email protected] > <javascript:>> wrote: > >> In my case it is because I have a single app that can be instanced into >> multiple pages (or twice in a single page) and need to prune the url of a >> part that needs to be ignored and need to completely ignore the url >> entirely (pure internal navigation for this state). The url's can be >> dynamic so knowing ahead of time is not always possible, but I've worked >> around it well enough for the moment by hot-swapping some code in the >> javascript. It is messy but eh, it works... >> >> >> On Tuesday, September 13, 2016 at 11:43:26 AM UTC-6, Peter Damoc wrote: >>> >>> Out of curiosity, what functionality are you actually trying to achieve? >>> >>> I'm trying to understand the need behind wanting to be dynamic in >>> ignoring a certain part of the url. >>> >>> Can you give some URL examples that show what you want to achieve? >>> >>> >>> >>> On Tue, Sep 13, 2016 at 8:12 PM, OvermindDL1 <[email protected]> wrote: >>> >>>> Does not work in my case of needing to specify a part of the url to >>>> ignore and to only change the remaining part. Right now I just have this >>>> in my code to 'work around it for now': >>>> ``` >>>> module SomeApp.Hacks exposing (..) >>>> >>>> {-| https://github.com/elm-lang/navigation/issues/9 >>>> -} >>>> >>>> navigationHack : String >>>> navigationHack = >>>> "/some" >>>> ``` >>>> >>>> On Tuesday, September 13, 2016 at 10:15:37 AM UTC-6, Peter Damoc wrote: >>>>> >>>>> >>>>> >>>>> On Tue, Sep 13, 2016 at 6:55 PM, <[email protected]> wrote: >>>>> >>>>>> >>>>>> 2. Giving the Url-Parser (of the Navigation package) access to the >>>>>> program flags. >>>>>> >>>>>> This was a little show stopper for me. I wanted to write a single >>>>>> page app that does not have to be recompiled if you switch the language. >>>>>> Different language files are built in, and there is a flag to choose the >>>>>> language. The problem is, that the paths in the url (after the hash) >>>>>> should >>>>>> also be in the chosen language. The url parser does not have access to >>>>>> the >>>>>> model (and I don't see how it could), but it could at least get access >>>>>> to >>>>>> the flags. I think that could be accomlished easily in >>>>>> Navigation.programWithFlags. >>>>>> >>>>> >>>>> Wouldn't be easier to just prefix all the urls with the language >>>>> >>>>> domain.com/#/en/some/path >>>>> domain.com/#/fr/vive/la/france >>>>> >>>>> This way you could look at the hash/location, figure the language, and >>>>> then chose the appropriate parser for that language. >>>>> (this is what I did in my app) >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> 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. >>>> >>> >>> >>> >>> -- >>> 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] <javascript:>. >> 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.
