API Docs for: 0.2.2
Show:

R.Router Class

Defined in: src\R.Router.js:10

R.Route provides methods in order to define specifics routes for the Router components

Methods

_extractParameters

(
  • regexp
  • fragment
)
Object private

Defined in src\R.Router.js:105

Parameters:

  • regexp Object
  • fragment Object

Returns:

Object:

param

_routeToRegExp

(
  • route
)
Object private

Defined in src\R.Router.js:90

Parameters:

  • route Object

Returns:

Object:

RegExp

def

(
  • fn
)
Object

Defined in src\R.Router.js:55

Setting up the default fonction to use for the match Function

Parameters:

  • fn String

Returns:

Object:

this

match

(
  • fragment
)
Object

Defined in src\R.Router.js:65

Determines whether the sentence match with at least one of routes

Parameters:

  • fragment String

    The sentence to test

Returns:

Object:

res The object of the corresponding route

route

(
  • pattern
  • pattern
)
Object

Defined in src\R.Router.js:21

Sets a route in a pattern, and combines function returning specific data

Parameters:

  • pattern String

    The pattern that will be associated with function

  • pattern String

    The pattern that will be associated with function

Returns:

Object:

this

routes

(
  • patterns
)
Object

Defined in src\R.Router.js:41

Parameters:

  • patterns String

Returns:

Object:

this