import { Component, OnInit, ChangeDetectorRef } from '@angular/core'; import { Container } from '@angular/compiler/src/i18n/i18n_ast'; import { MediaMatcher } from '@angular/cdk/layout'; import { HBORCommunicationService, HBORSettingsService } from 'ngx-hbor-lib'; import { Router } from '@angular/router'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'], providers: [HBORCommunicationService, HBORSettingsService] }) export class AppComponent implements OnInit { mobileQuery: MediaQueryList; private _mobileQueryListener: () => void; constructor(changeDetectorRef: ChangeDetectorRef, media: MediaMatcher, private router: Router) { this.mobileQuery = media.matchMedia('(max-width: 600px)'); this._mobileQueryListener = () => changeDetectorRef.detectChanges(); this.mobileQuery.addListener(this._mobileQueryListener); } ngOnInit() { this.router.navigate(['/home'], { skipLocationChange: true }); } goToHome() { this.router.navigate(['/home'], { skipLocationChange: true }); } goToDemo() { this.router.navigate(['/demo'], { skipLocationChange: true }); } openDocs() { window.open('http://sql2008-razvoj:8083/doc/angular%2Fhbor-angular-cli-library.git/master/README.md', '_blank'); } }