Usage
Signature:
class ModuleRouterAdapter<D extends Record<string, any> = Record<string, any>, P extends Record<string, any> = Record<string, any>>
Generic Parameters
Parameter Description D Detail object for the router state P Parameters object for the router state
Typescript Import Format
//This class is exported directly as module. To import it
import ModuleRouterAdapter= require("ojs/ojmodulerouter-adapter");
For additional information visit:
Constructor
new ModuleRouterAdapter(router, options)
Parameters:
| Name | Type | Argument | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
router |
CoreRouter.<D, P> | The instance of the CoreRouter, that manages application navigation for a page or a section of the page. | |||||||||||||||||||||||||
options |
Object |
<optional> |
Options object used for loading views and view models and configuring oj-module animation.
Properties
|
Fields
-
animation :oj.ModuleElementAnimation
-
An implementation of ModuleElementAnimation interface created by the ModuleRouterAdapter, which can be used as the
animationproperty of the oj-module element. This property is created only when animationCallback property is defined for the ModuleRouterAdapter. -
koObservableConfig :{view: Array.<Node>, viewModel: oj.ModuleViewModel}
-
The observable object created by the ModuleRouterAdapter, which can be used as the
configproperty of the oj-module element.
Type Definitions
-
AnimationCallbackParameters
-
ViewModelParameters<D extends Record<string, any>, P extends Record<string, any>>
-
- Deprecated:
-
Since Description 8.1.0Use CoreRouter.CoreRouterState.params instead. - Deprecated:
-
Since Description 8.1.0Use router property instead.
Properties:
Name Type Description paramsP The value of CoreRouterState params property. parentRouterCoreRouter.<D, P> The instance of the CoreRouter, that used by the ModuleRouterAdapter instance. routerCoreRouter.<D, P> The instance of the CoreRouter, that used by the ModuleRouterAdapter instance. routerStateCoreRouter.CoreRouterState<D, P> The current state of CoreRouter