erikringsmuth / app-router

Router for Web Components
https://erikringsmuth.github.io/app-router/
MIT License
611 stars 83 forks source link

Confusing behavior if both hash and path conflict #16

Closed esprehn closed 10 years ago

esprehn commented 10 years ago

ex. If you have a route for /foo, and then go to /bar#/foo it'll load the /foo view, even though the /bar prefix is on it.

It would also be nice to have some way to disable hash urls entirely and only allow push state.

erikringsmuth commented 10 years ago

Ah, that makes sense. I could add an attribute like <app-router pathType="auto|hash|regular">. Then regular would ignore the hash altogether.

I'll play around with this and see what works best.

erikringsmuth commented 10 years ago

I implemented the change https://github.com/erikringsmuth/app-router/commit/b64a66acba294f7cc707b0cc385952b637c6e79f and released version 0.7.0. Setting <app-router pathType="regular"> will disable hash paths altogether.

I also documented the Path Type feature on the API page.

Cheers!