R.Router Class
R.Route provides methods in order to define specifics routes for the Router components
Item Index
Methods
Methods
_extractParameters
(
Object
private
-
regexp
-
fragment
Parameters:
-
regexp
Object -
fragment
Object
Returns:
Object:
param
_routeToRegExp
(
Object
private
-
route
Parameters:
-
route
Object
Returns:
Object:
RegExp
def
(
Object
-
fn
Setting up the default fonction to use for the match Function
Parameters:
-
fn
String
Returns:
Object:
this
match
(
Object
-
fragment
Determines whether the sentence match with at least one of routes
Parameters:
-
fragment
StringThe sentence to test
Returns:
Object:
res The object of the corresponding route
route
(
Object
-
pattern
-
pattern
Sets a route in a pattern, and combines function returning specific data
Parameters:
-
pattern
StringThe pattern that will be associated with function
-
pattern
StringThe pattern that will be associated with function
Returns:
Object:
this
routes
(
Object
-
patterns
Parameters:
-
patterns
String
Returns:
Object:
this