Hi,
can.route.ready is called already when can is loaded, I'm using the AMD version 1.1.7:
- define([ 'can'] , function(can) {
- // here can.route already started.
- });
Now I got problems when I whant to work with defined routes and other attributes like:
- #!main/sub&type=video&foo=bar
When I reload the page, the hash will destroyed to, and the route doesn't work.
- #!&main%2Fsub=&type=video&foo=bar
The problem is, that can.route.ready is called when can is required, because of can.route line 516:
- if( (document.readyState === 'complete' || document.readyState === "interactive") && onready) {
The "onready" variable cannot change, so I don't have a possibility to really start the routing manually.
Why the routing always has to start automatically always on document ready?
For me all works fine, when I change route.js line 60 from
- onready = !0,
to
- onready = !1,
Maybe someone can give me a better solution?
Best wishes