Class puredom.RouteManager
- Defined in: RouteManager.js
- Extends puredom.ControllerManager
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
puredom.RouteManager(options)
Manages controllers, providing a means for separating functionality into feature-centric modules.
|
| Field Attributes | Field Name and Description |
|---|---|
|
RouteManagers are singular by default, because a browser can only navigate to one URL at a time.
|
- Fields borrowed from class puredom.ControllerManager:
- controllerOptions
Method Summary
| Method Attributes | Method Name and Description |
|---|---|
|
doStateUpdate
(state, options)
For use with StateManager
|
|
|
register
(name, controller)
|
|
|
restoreState
(state)
For use with StateManager
|
|
|
route
(url)
Attempt to route the given URL to a controller.
|
|
|
routeDefault
(url)
Attempt to route the given URL to a controller.
|
- Methods borrowed from class puredom.ControllerManager:
- current
- destroy
- get
- getList
- init
- load
- loadDefault
- loadPrevious
- none
- postMessage
- reloadCurrent
Class Detail
puredom.RouteManager(options)
Manages controllers, providing a means for separating functionality into feature-centric modules.
- Parameters:
- {Object} options Optional
- Hashmap of options to be given to the instance.
- {Boolean} options.allowTemplateFallback Optional, Default: false
- If no URL templates match, attempt to load by name.
- {Boolean} options.useBest Optional, Default: false
- If no URL templates match, attempt to load by name.
- {Boolean} options.allowPartialUrlFallback Optional, Default: false
- Use the longest URL template match, even if it isn't a perfect match.
Field Detail
rewrites
singular
RouteManagers are singular by default, because a browser can only navigate to one URL at a time.
Method Detail
-
doStateUpdate(state, options)For use with StateManager
- Parameters:
- {Any}state
- {Any}options
-
register(name, controller)
- Parameters:
- {Any}name
- {Any}controller
-
restoreState(state)For use with StateManager
- Parameters:
- {Any}state
-
route(url)Attempt to route the given URL to a controller.
- Parameters:
- {Any}url
-
routeDefault(url)Attempt to route the given URL to a controller.
- Parameters:
- {Any}url