I would like use this tuto, but doesn't work for me
$(function() { Router = can.Control({ "completed route" : function(){ console.log("the hash is #!completed") }, "active route" : function(){ console.log("the hash is #!active") }, "project/create" : function(){ console.log("the hash is #!project/create") }, "route" : function(){ console.log("empty hash") } }); // make sure to initialize the Control new Router(document); });
I use window.location.hash = "!#completed"
or <a href="#!active">Show Active</a>
no message is displayed in console.
I use canjs 2.0.4 with JQuery
Thank for help