ready

  • function
can.route.ready  

can.route.ready( readyYet )

Pause and resume the initialization of can.route.

Parameters

  1. readyYet {Boolean}Optional

    Whether the ready event should be fired yet.

Returns

{can.route(template, defaults)}

The can.route object.

Indicates that all routes have been added and sets can.route.data based upon the routes and the current hash.

By default, ready is fired on jQuery's ready event. Sometimes you might want it to happen sooner or earlier. To do this, call:

can.route.ready(false); //prevents firing by the ready event
can.route.ready(true); // fire the first route change