import { Component } from '@angular/core' ; import { BreakpointObserver , Breakpoints } from '@angular/cdk/layout' ; import { Observable } from 'rxjs' ; import { map } from 'rxjs/operators' ; import { environment } from 'src/environments/environment' ; @ Component ( { selector : 'app-nav' , templateUrl : './nav.component.html' , styleUrls : [ './nav.component.css' ] } ) export class NavComponent { isHandset$ : Observable < boolean > = this . breakpointObserver . observe ( Breakpoints . Handset ) . pipe ( map ( result => result . matches ) ) ; guestbookName : string ; constructor ( private breakpointObserver ) { this . guestbookName = environment . guestBookName ; } }