ramiel / router.js

Router.js is a simple and powerful javascript library to handle routing
116 stars 21 forks source link

Anchor Links on Page #17

Closed jonathanamartin closed 9 years ago

jonathanamartin commented 9 years ago

Hey there,

Again great library! Just had a question about anchor links on a page. Do you have any recommendations for handling anchor/jump links on a page? For example, is there a way to change the route delimiter to use something like '#!'?

Any help would be greatly appreciated.

ramiel commented 9 years ago

Hi, the only available option to handle anchor links is for ignore case on anchors. There is no option to change the delimiter. I think you can use the delimiter you want because the route engine check the string after the # symbol so, if there is a ! should be equivalent. Anyway I haven't testd. If you notice an issue just say to me. We could do:

So, I don't have any specific raccomandations but I can say the only well tested situation involves using only # as symbol.

jonathanamartin commented 9 years ago

Hey sounds good. I'll take a look at adding an option and doing some testing with that. Thanks for the info.