Routing with Sammy.js

Traditionally web applications were dependent on back end for routing as A request is made to a server and based on the URL being requested the server responds by HTML.But now a days due to advanced browsers and need for speedy response more advanced code started being moved from the backend to the frontend. Sammy.js is a tiny(Above theory is good for starting so now lets move on with example of sammy js using type script. public addRoute(url: string, action: (context: Sammy.EventContext) => void) { this.routeTable[url] = action; } Above is the typescript method which take