Constructor
new Router(_routesopt)
Router holds and manages array of Path routes
Path Routes are used by ViewManager to find associated Navigator and Viewstack
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
_routes |
array |
<optional> |
[] | Path routes array |
- Source:
Methods
Name | Description |
---|---|
addRoute | Adds new Path Route |
findNavigator | finds associated Navigator by Path route Name |
findNavigatorParent | finds associated Navigator Parent by navigator ID |
findViewStack | finds associated ViewStack by Path route Name |
printRoutes | prints path Routes |
reset | Remove and Resets existing path routes |
addRoute(_path, _navigatorId, _parentId)
Adds new Path Route
Parameters:
Name | Type | Description |
---|---|---|
_path |
string | Path Name |
_navigatorId |
string | Navigator ID |
_parentId |
string | Parent Object / Element ID |
- Source:
findNavigator(_route) → {Array}
finds associated Navigator by Path route Name
Parameters:
Name | Type | Description |
---|---|---|
_route |
string |
- Source:
Returns:
- NavigatorID Array
- Type
- Array
findNavigatorParent(_navigatorId) → {string}
finds associated Navigator Parent by navigator ID
Parameters:
Name | Type | Description |
---|---|---|
_navigatorId |
string |
- Source:
Returns:
- Parent ID
- Type
- string
findViewStack(_route) → {string}
finds associated ViewStack by Path route Name
Parameters:
Name | Type | Description |
---|---|---|
_route |
string |
- Source:
Returns:
- ViewStack ID
- Type
- string
printRoutes()
prints path Routes
- Source:
reset()
Remove and Resets existing path routes
- Source: