DoneJS StealJS jQuery ++ FuncUnit DocumentJS
3.0.0
2.3.27

 

  • Github
  • Twitter
  • Chat
  • Forum
  • Guides
  • Core
    • can-component
    • can-compute
    • can-connect
    • can-define
    • can-define/list/list
    • can-define/map/map
    • can-route
      • static
        • current
        • data
        • deparam
        • link
        • matched
        • param
        • ready
        • url
    • can-route-pushstate
    • can-set
    • can-stache
    • can-stache/helpers/route
    • can-stache-bindings
  • Ecosystem
  • Infrastructure
  • Legacy
  • Bitovi
    • Bitovi.com
    • Blog
    • Consulting
    • Training
    • Open Source
  • Chat
  • Forum
  • Star
  • Follow @canjs
  • CanJS
  • /
  • Core
  • /
  • can-route
  • /
  • ready
  • / On this page
    • ready

      function

      Initializes can-route.

      • source

      route.ready()

      Sets up the two-way binding between the hash and the can-route observable map and sets the route map to its initial values.

      route("{page}", { page: "home" }));
      
      route.ready();
      route.data.page; // -> "home"
      

      Returns

      {can-route(template, defaults)}:

      The can-route object.

      Use

      After setting all your routes, call route.ready().

      route("overview/{dateStart}-{dateEnd}");
      route("{type}/{id}");
      route.ready();
      

      CanJS is part of DoneJS. Created and maintained by the core DoneJS team and Bitovi. Currently 3.0.0.