There is nothing "technically" incorrect in e.g.
<a href="myapp.com/#/account/15?sortBy=date">15</a>

All the SPA I have seen had URLs like this, because this is just the
browser who cares about that part of the location.

This is why, when creating e.g.:
<a href="/#/account/16?sortBy=date">next</a>
there is no need to hack browser to stop it from page reload as this is all
about going somewhere else on the same "Page", the "P" in SPA.

All I wrote in Elm was a small app with two forms and I did not have to
parse location, but in AngularJS the location services (or similar plugins)
have no troubles parsing and destructuring the page fragment part.

Looking at https://github.com/evancz/url-parser it seems that this library
is covering only very basic parsing capabilities, there should be more
complete libs in the public package repository though.

Regards,
Witold Szczerba

On Sun, Dec 11, 2016 at 10:35 PM, Charlie Koster <[email protected]>
wrote:

> If I use hashes I now have to do manual work in order to use and parse
> query strings.
>
> Let's say I want to handle a query string such as
> "myPage?search=things&order=asc". If there's a hash in front of "myPage"
> the query string doesn't get interpreted as a search string by
> elm-lang/Navigation (correct behavior), and evancz/url-parser doesn't parse
> my query string parameters. As a result, I'd have to parse the technically
> incorrect query string from the hash by hand.
>
> I'd rather use a URL where the query string is technically correct in
> order to avoid future issues with these packages or other url and routing
> packages.
>
> --
> 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.
>

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