I am building an ajax website and it loads pages when I click on the navigation buttons just fine but the issues come when I reload the page. Once I reload the page, The page defaults back to loading main.html no matter what the url is. My hash is a little different, it looks like this /#!/. How can I retrieve the url and loose everything except the /Path/. For reference, this is what one of my urls looks like http://mysite.com/#!/account/settings. How do I get just the account/settings part of the url. Thanks a lot if I made any sense.
I am building an ajax website and it loads pages when I click on
Share
Use a regular expression. I’m not the best at regex but this works:
http://jsfiddle.net/elclanrs/WUL6a/