How to use the esp-js-ui.espModule function in esp-js-ui

To help you get started, we’ve selected a few esp-js-ui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github esp / esp-js / examples / esp-js-ui-module-based-app / src / trading-module / tradingModule.ts View on Github external
StateService,
    ComponentFactoryBase,
    SystemContainerConst,
    PrerequisiteRegister,
    Logger,
    espModule
} from 'esp-js-ui';
import {TradingModuleContainerConst} from './tradingModuleContainerConst';
import {CashTileComponentFactory} from './cash-tile/cashTileComponentFactory';
import {BlotterComponentFactory} from './blotter/blotterComponentFactory';
import {BlotterModel} from './blotter/models/blotterModel';
import {TradingModuleDefaultStateProvider} from './tradingModuleDefaultStateProvider';

let _log = Logger.create('TradingModule');

@espModule('trading-module', 'Trading Module')
export class TradingModule extends ModuleBase {
    _componentFactoryGroupId: string;
    _tradingModuleDefaultStateProvider = new TradingModuleDefaultStateProvider();

    constructor(container: Container, stateService: StateService) {
        super(container, stateService);
        this._componentFactoryGroupId = uuid.v4();
    }

    protected getDefaultStateProvider() {
        return this._tradingModuleDefaultStateProvider;
    }

    configureContainer() {
        _log.group('Configuring container');
        _log.debug(`Registering ${TradingModuleContainerConst.cashTileComponentFactory}`);