To handle the initial request that doesn't contain a hash, use the empty route you mentioned at the bottom of your list of routes
/* Get Home view for empty hash URLs
*/
this.get("", function () {
this.app.runRoute("get", "#Home");
});
In order for normal links on your site to work, i.e. links to binary files that AJAX requests don't handle, set up your anchor elements with a hash route and parameters as follows (code uses Razor syntax)
<a href="@Url.Content("#Reporting/Excel/" +
Model.Report.Type.ToString() + "/" +
Model.Report.Audience.ToString() + "/" +
Model.Report.UnitID.ToString() + "/" +
Model.Report.DepartmentID.ToString())">Download Excel version</a>
Now create a route for Sammy to send to the actual URL
/* Reporting Excel requests
*/
this.get("#Reporting/Excel/:type/:audience/:unitID/:departmentID", function () {
location.assign("Report/Excel?" +
"Type=" + this.params.type + "&" +
"Audience=" + this.params.audience + "&" +
"UnitID=" + this.params.unitID + "&" +
"DepartmentID=" + this.params.departmentID
);
});