visionmedia / page.js

Micro client-side router inspired by the Express router
http://visionmedia.github.com/page.js
7.67k stars 687 forks source link

Make query string parameters work when using hashbang routing #550

Closed 5im-0n closed 4 years ago

5im-0n commented 4 years ago

When hashbang is true, urls like http://localhost/?foo=bar got redirected to http://localhost/?foo=bar#!?foo=bar. This duplicated the query string and made the url ugly. This commit fixed this problem by making urls like http://localhost/?foo=bar redirect to http://localhost/#!?foo=bar

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.06%) to 92.623% when pulling 9c77c1ff44d7a66cd2a9df0ba5bd1ecd4c264e82 on S2-:qs-on-hash into 94138d1f3105f9fdb3424f9c0870c1fb90adcd1a on visionmedia:master.

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.06%) to 92.623% when pulling 9c77c1ff44d7a66cd2a9df0ba5bd1ecd4c264e82 on S2-:qs-on-hash into 94138d1f3105f9fdb3424f9c0870c1fb90adcd1a on visionmedia:master.

5im-0n commented 4 years ago

No sorry. this breaks when hashbang: false. Need to work on it some more.