import { Injector, ElementRef, Component, OnInit, AfterViewInit, ViewChild } from '@angular/core'; import { appModuleAnimation } from '@shared/animations/routerTransition'; import { ThemesLayoutBaseComponent } from '@app/shared/layout/themes/themes-layout-base.component'; import { UrlHelper } from '@shared/helpers/UrlHelper'; import { LayoutRefService } from '@metronic/app/core/_base/layout/services/layout-ref.service'; import { AppConsts } from '@shared/AppConsts'; @Component({ templateUrl: './theme4-layout.component.html', selector: 'theme4-layout', animations: [appModuleAnimation()] }) export class Theme4LayoutComponent extends ThemesLayoutBaseComponent implements OnInit, AfterViewInit { @ViewChild('ktHeader', { static: true }) ktHeader: ElementRef; remoteServiceBaseUrl: string = AppConsts.remoteServiceBaseUrl; constructor( injector: Injector, private layoutRefService: LayoutRefService ) { super(injector); } ngOnInit() { this.installationMode = UrlHelper.isInstallUrl(location.href); } ngAfterViewInit(): void { this.layoutRefService.addElement('header', this.ktHeader.nativeElement); } }