I would like to execute a process on the page load depending on what the hash in the URL is. I think I will need RegEx because I am looking for a pure JavaScript solution (no library dependencies).
What I am trying to do is if the hash is "#/products", then I will call "myIndex()" else if the hash is "#/products/3", then I will call "myDetail(id)" where "id" is a variable to the product number.
Anybody have a good idea on how to achieve this?