次のような can.Control があります。
can.Control({
"route": function(){
...
},
"a.test click": function(){
can.route.attr({
page: "home",
type: "test"
});
}
});
現在のページが {page: "home", type: "test"} の場合、"route" コールバックは呼び出されません。
現在表示しているページに関係なく、ルート イベントをトリガーするにはどうすればよいですか?
私の考え...直接
呼び出すことはできますthis.route()
が、URLの変更を処理する必要があるため、良い解決策ではありません.