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
  • /
  • matched
  • / On this page
    • matched

      function

      A compute representing the currently matched route.

      • source

      route.matched()

      Returns

      {String}:

      The currently matched route.

      Use route.matched() to find the currently matched route.

      route("{type}", { type: "foo" });
      route("{type}/{subtype}");
      
      route.matched(); // "{type}"
      
      route.data.subtype = "foo";
      
      route.matched(); // "{type}/{subtype}"
      

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