import {Component, ElementRef, OnInit} from '@angular/core'; import SettingService from "@common/services/setting"; import UtilService from "@common/services/util"; import DimmerService from "@common/services/dimmer"; declare const $: any; @Component({ selector: 'sitePage', templateUrl: './template.html', styleUrls: ['./style.less'] }) export default class SitePage implements OnInit { element: any; loadingActive: boolean = false; constructor(private settingService: SettingService, private dimmerService: DimmerService, private utilService: UtilService, private el: ElementRef) { this.element = $(el.nativeElement); this.element.on('click', ev => { this.settingService.shouldFoldMenuBar(); }); this.loadingActive = this.dimmerService.active; this.dimmerService.activeEvent.subscribe(value => { this.loadingActive = value; }) } ngOnInit(): void { } }