root
Configure the base url that will not be modified.
String
Represents the base url that pushstate will prepend to all
routes. root
defaults to: "/"
.
Use
By default, a route like:
route(":type/:id")
Matches urls like:
http://domain.com/contact/5
But sometimes, you only want to match pages within a certain directory. For example, an application that is a filemanager. You might want to specify root and routes like:
route.pushstate.root = "/filemanager/"
route("file-:fileId");
route("folder-:fileId")
Which matches urls like:
http://domain.com/filemanager/file-34234