import { Component } from '@angular/core'; import {StateService} from '../state.service'; @Component({ selector: 'app-main', templateUrl: './main.component.html', styleUrls: ['./main.component.css'] }) export class MainComponent { constructor(private state: StateService) { } changeTab(tab) { this.state.currentTab = tab.index; } public get greyOut() { return this.state.querySelectionMode; } public get loadingProgress(): number { return this.state.loadingProgress; } }