Members
(static) bypassQueue :Boolean
Type:
Properties:
Name |
Type |
Description |
bypassQueue |
|
Set this property to `true` to dispatch the enqueued url instantly. |
- Source:
(static) config
Properties:
Name |
Type |
Description |
config |
|
Properties
Name |
Type |
Description |
protocol |
String
|
Force all protocol different from this to be discarded |
|
- Source:
(static) currentRoute :Object
Type:
Properties:
Name |
Type |
Description |
currentRoute |
|
Latest Route (not URL) dispatched |
- Source:
(static) currentUrl :String
Type:
Properties:
Name |
Type |
Description |
currentUrl |
|
Latest URL dispatched |
- Source:
(static) go
- Source:
(static) queue :Array
Type:
Properties:
Name |
Type |
Description |
queue |
|
The route queue |
- Source:
(static) stack :Array
Type:
Properties:
Name |
Type |
Description |
stack |
|
All routes in a stack |
- Source:
Methods
(static) alias(url, newUrl)
Make an alias route
Parameters:
Name |
Type |
Description |
url |
String
|
|
newUrl |
String
|
|
- Source:
(static) appendToQueue(array)
Parameters:
Name |
Type |
Description |
array |
Array
|
|
- Source:
(static) autoMapModel(single, pluralopt)
Create the routes for a model
Parameters:
Name |
Type |
Attributes |
Description |
single |
String
|
|
The name for the model |
plural |
String
|
<optional>
|
The name for the model, plural. |
- Source:
(static) dispatch(url)
Dispatch the router
This function call the defined function with `Router.on`
The param `this` represents an XCallback-URL Object for selected route.
See https://github.com/FokkeZB/UTiL/blob/master/XCallbackURL/XCallbackURL.js for more details.
The arguments passed are the matches for your regex definition (if present)
Parameters:
Name |
Type |
Description |
url |
String
|
The route |
- Source:
(static) dispatchQueue(bypassFromNow)
Dispatch the queue
Parameters:
Name |
Type |
Description |
bypassFromNow |
Boolean
|
Indicate if (from now) should not enqueue routes but dispatch directly |
- Source:
(static) enqueue(url)
Parameters:
Name |
Type |
Description |
url |
String
|
The route |
- Source:
(static) on(key, callback)
Register a route with defined callbacks
Parameters:
Name |
Type |
Description |
key |
Object
|
The route name.
It can be:
* `String`: (exact route match)
* `RegExp`: is evaluated with the argument and the matches are passed to the callback
* `Function`: must return a `non-undefined` value to be executed. That value is passed to the callback |
callback |
function
|
The callback |
- Source: