Router Class
Item Index
Methods
Properties
Methods
_convertToRegex
(
Object
private
-
routes
convert route urls to regex
Parameters:
-
routes
Object Map
Returns:
Object:
_getParamsForMatch
(
Map:
private
-
match
Parameters:
-
match
Objectreturn of me.match()
Returns:
Map::
, arr:[]}|Null}
_hasParameterDefined
(
Boolean
private
-
callback
checks the callback function to see whether the parameter _defaults was declared for the function
Parameters:
-
callback
Function
Returns:
Boolean:
_routeCallback
()
private
this function checks whether the callback has the method _defaults declared are a paramter. if not: the _defaults method is called after the callback is fired if yes: the _defaults method is passed to the callback as an argument, which must then be manually called used by callRoute()
_set
(
private
-
routes
Parameters:
-
routes
Object Map
callRoute
(
-
url
-
args
Parameters:
-
url
String -
args
Arguments Array
match
(
-
href
Parameters:
-
href
String
Returns:
match or null
scrollTo
(
-
target
Parameters:
-
target
Stringjquery selector
Properties
_routes
Array
private
Default: []