ShellHub
Controls the shell. Extends MessageHub.
- Module:
platform-core
- Source: platform-core/ui/platform/shell-hub.js
- Web Link:
/services/web/platform-core/ui/platform/shell-hub.js
- Status:
stable
- Group:
platform
Basic Usage
If you are using the standard Dirigible view configuration, shell hub support is automatically enabled.
If you are making a custom view, you can include the API using the web link above.
To initialize it:
const shellHub = new ShellHub();
Functions
Function | Description | Returns |
---|---|---|
showPerspective(IdParamObject) | Shows a perspective. | - |
onShowPerspective(handlerFunc) | Registers a listener. Triggered when a perspective should be shown. Returns a function to unregister the listener. | function |
Typedefs
- IdParamObject :
Object
Note
Params in square brackets are optional.
IdParamObject : Object
Properties
Param | Type | Description |
---|---|---|
id | string |
Perspective id. |
[params] | object |
Custom parameters. See ViewParameters. |
Example
shellHub.openView({
id: 'exampleView',
params: {
title: 'Example',
}
});