API Docs for: 0.3
Show:

Url.common Class

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

Item Index

Methods

Methods

find

(
  • url
  • verb
)

Finds the first matching route from the given URL

Parameters:

  • url String

    the URL to find a route for.

  • verb String

    the HTTP method.

make

(
  • base
  • action
  • routeParams
  • varb
  • 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

    used to lookup the route in the routing table.

  • varb String

    GET, POST, PUT, DELETE (case insensitive).

  • urlParams Object

    added to the looked up route as query params.