Constructor Summary
| Public Constructor | ||
| public |
constructor(dispatcher: Dispatcher, location: Location) Creates a new Router instance |
|
Member Summary
| Public Members | ||
| public |
dispatcher: * |
|
| public |
|
|
| public |
location: * |
|
| public |
|
|
| public |
routes: * |
|
Method Summary
| Public Methods | ||
| public |
Activates the store by hooking up dispatcher and location listeners. |
|
| public |
Deactivates the store by removing any listeners from dispatcher and location. |
|
| public |
Returns the registered routes. |
|
| public |
handleNavigation(href: String) Handle start, change and navigate actions. |
|
| public |
matchRoute(href: String): Object Finds the route for the given url. |
|
| public |
Navigates to the given url. |
|
| public |
Register the given routes. |
|
| public |
Exports route state to props object. |
|
| Private Methods | ||
| private |
Prepares a route object with given data. |
|
Public Constructors
public constructor(dispatcher: Dispatcher, location: Location) source
Creates a new Router instance
Params:
| Name | Type | Attribute | Description |
| dispatcher | Dispatcher | instance to use |
|
| location | Location | instance to use |
Public Members
public dispatcher: * source
public dispatcherHandler: * source
public location: * source
public locationHandler: * source
public routes: * source
Public Methods
public activate(initialURI: String) source
Activates the store by hooking up dispatcher and location listeners.
Params:
| Name | Type | Attribute | Description |
| initialURI | String | initial url |
public deactivate() source
Deactivates the store by removing any listeners from dispatcher and location.
public handleNavigation(href: String) source
Handle start, change and navigate actions.
Params:
| Name | Type | Attribute | Description |
| href | String |
public matchRoute(href: String): Object source
Finds the route for the given url.
Params:
| Name | Type | Attribute | Description |
| href | String |
public navigate(href: String) source
Navigates to the given url.
Params:
| Name | Type | Attribute | Description |
| href | String |
public setRoutes(routes: Object) source
Register the given routes.
Params:
| Name | Type | Attribute | Description |
| routes | Object |