import { AfterViewInit } from '@angular/core'; import { EventTransceiverReceiveRegisterComponentEvent, EventTransceiverReceiveComponentRenderEvent } from '../actions/index'; import { Store } from '@ngrx/store'; import { State } from '../../../reducers'; type componentKey = 'HD_COMPONENT'; export class HDComponent implements AfterViewInit { constructor(private rootStore: Store, private componentType: string) { this.rootStore.dispatch(new EventTransceiverReceiveRegisterComponentEvent(this.componentType)); } ngAfterViewInit(): componentKey { this.rootStore.dispatch(new EventTransceiverReceiveComponentRenderEvent(this.componentType)); return 'HD_COMPONENT'; } }