Question

I have this kind of link for my website:

https://www.mywebsite.net/#/student

I know it looks professional but I have some problems with the server, whenever I send the url to the server, It just cut away everything that comes after the hash (#).

I wonder if we can change '#' to something else, like '?' or anything but '#'?

I'm using DurandalJS package

Thanks so much.

Was it helpful?

Solution

The hash is required. Hash indicates to the browser that the link is on the same page and no navigation should take place. Also, the Durandal router tracks works by tracking changes to the hash.

If you need to, it may be better to include some of the information about your current route in your server calls. However, using a RESTful API works extremely well with SPA like those built in Durandal. By definition, a RESTful API does not need to know any information about your current view to provide you with data.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top