This works fine for <a href="/app/broken-link/">asdf</a> but not for <a href="/app/deep/broken/link">asdf</a>. I'd rather not add infinite amounts of can.route(":section/:sub/")
- can.route.bindings.pushstate.root = "/app/";
- can.route("", {section:""});
- can.route(":section/");
- can.route.ready();
- "{can.route} section": function(route, event, newVal)
- {
- switch (newVal)
- {
- case "":
- {
- console.log("home");
- break;
- }
- case "some-page1":
- case "some-page2":
- {
- console.log(newVal);
- break;
- }
- default:
- {
- console.log("404");
- }
- }
- }