API Docs for: 0.6.1
Show:

Url.common Class

Access point: ac.url.* Generates URL's based on the applictions routing configuration

Item Index

Methods

Methods

find

(
  • url
  • the
)

Finds the first matching route from the given URL

Parameters:

  • url String

    the URL to find a route for.

  • the String

    HTTP method. Default value is "get".

make

(
  • base
  • action
  • routeParams
  • verb
  • urlParams
)

Generates a URL from the given parameters

Parameters:

  • base String

    Base mojit defined at the root level of the Mojito application configuration.

  • action String

    Action reference, concatenated to the base using a period (.) separator.

  • routeParams Object | String

    used to lookup the route in the routing table. If string is provided, Y.QueryString.parse will be used.

  • verb String

    the HTTP method. Default value is "get".

  • urlParams Object | String

    added to the looked up route as query params, this has priority over routeParams. If string is provided, Y.QueryString.parse will be used.