class TabComponent implements OnInit, OnDestroy {
@Input() public inputData: Subject<any>;
@Output() public closeHandler = new EventEmitter();
public data: any = [];
public fields: any;
public fieldsMap: any;
private _inputData: Subscription;
constructor(
public appState: AppState,
public lumosServer: LumosServer
) {
}
public ngOnInit() {
this.fields = FIELDS;
this.fieldsMap = FIELDSMAP;
this._inputData = this.inputData.subscribe((result) => {
this.data = result;
});
}
public ngOnDestroy() {
this._inputData.unsubscribe();
}
public getStatusColor = (status) => {
status = _.lowerCase(status);
return this.appState.get('colorStatus')[status];
}
public close = () => {
this.closeHandler.emit('');
}
}
событие пустой строчкой — нехорошо
Обсуждают сегодня