Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hash is encoded but... #28

Open
JSteunou opened this issue Dec 6, 2016 · 1 comment
Open

Hash is encoded but... #28

JSteunou opened this issue Dec 6, 2016 · 1 comment

Comments

@JSteunou
Copy link
Contributor

JSteunou commented Dec 6, 2016

I dont know if it's the right behavior. I'm actually using backbone and the way to describe routes (like many front-end framework) is with hash like foo/1 which become foo%2F1 when using domurl to manipulate query parameters.

@davidlevy
Copy link

Same for me with Backbone
I ended up adding the hash manually
e.g. to add a qs param :

    var u  = new Url(url);
    u.query[parameterName] = parameterValue;
    var hash = u.hash;
    u.hash = '';
    var result = '' + u + (hash ? '#' + hash : '');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants