can.route.binding

  • typedef

{Object}

 

Object

Properties

  1. root {String}

    The starting point of the url to match. For hashchange, the value is "#!". For pushstate, the value is /. This can be overwritten before can.route.ready is called like:

    can.route.bindings.pushstate.root = "/site/"
    
  2. querySeparator {String}

    Specifies the seperator between the path part of the url and the query (also known as search) part of the url. For hashchange, the value is "&". For pushstate, the value is "?".

  3. paramsMatcher {RegExp}

    A regular expression that is used to identify the key=value pairs in the query part of the url.

  4. matchingPartOfURL {function()}

    Reads the url and returns the part that is used for matching routes.

  5. setURL {function(path)}

    Called with the serialized can.route data after a route has changed. Returns what the url has been updated to.

    • {path}
  6. bind {function()}

    Attaches listeners to the document to know when the url has changed. Typically bind is called when can.route.ready is called.

  7. unbind {function()}

    Tears down the bindings to the document.