I make this routing test with properties, search and registration for vehicles
my code
$(function() {Router = can.Control({"vehicles" : function(){console.log("the hash is #!vehicles")},"vehicles/:registration" : function(data){console.log("the hash is #!vehicles/:registration "+data)},"vehicles/:search" : function(data){console.log("the hash is #!vehicles/:search "+data)}});can.route("vehicles");can.route("vehicles/:registration");can.route("vehicles/:search");can.route.ready();new Router(document);});
and the tests
Test one
>> can.route.attr("search", "121-TYU-898")
a {_data: Object, _cid: ".map1", _computedBindings: Object, __bindEvents: Object, _bindings: 2…}
That ok, but no message ("the hash is #!vehicles/:search "+data) in console
Test two
>> can.route.attr("registration", "333-TYU-898")
a {_data: Object, _cid: ".map1", _computedBindings: Object, __bindEvents: Object, _bindings: 2…}
That ok, but no message ("the hash is #!vehicles/:registration "+data) in console
Test three
>> can.route.attr("search", "444-TYU-555")
a {_data: Object, _cid: ".map1", _computedBindings: Object, __bindEvents: Object, _bindings: 2…}
I don't understand, for me, i expect this answer
a {_data: Object, _cid: ".map1", _computedBindings: Object, __bindEvents: Object, _bindings: 2…}
Could you help to understand, thank you