I use canJs with plugin can.Map.delegate and i would like this, but it doesn't work, "ok" is not displaying in console.
Could you help me ?
$(function() {
var Routing = can.Control({
'{can.route} id=3': function(data) {
console.log("ok");
}
});
var routeDelegate = can.route(":id");
can.route.ready();
routeDelegate.delegate("id", "set");
new Routing(document);
can.route.attr("id", 3);
});
Thank you