I have a can.Control that looks like this:
can.Control({
"route": function(){
...
},
"a.test click": function(){
can.route.attr({
page: "home",
type: "test"
});
}
});
"route" callback is not being called if the current page is {page: "home", type: "test"}.
How can I trigger a route event regardless of the page I'm currently on?
My thoughts...
I can call this.route()
directly, but then I have to handle changing the URL, which makes it not a good solution.
Here about route in canjs: http://canjs.com/docs/can.route.html