dnet-applications/frontends/dnet-is-application/src/app/app.component.ts

25 lines
682 B
TypeScript
Raw Normal View History

2023-01-26 14:56:39 +01:00
import { Component, inject } from '@angular/core';
2023-01-19 14:47:52 +01:00
import { TitleStrategy } from '@angular/router';
2023-01-20 11:39:34 +01:00
import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
import { Observable } from 'rxjs';
import { map, shareReplay } from 'rxjs/operators';
2023-01-19 14:47:52 +01:00
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
2023-01-20 11:39:34 +01:00
title = 'D-NET Information Service Application';
2023-01-19 14:47:52 +01:00
2023-01-20 11:39:34 +01:00
isHandset$: Observable<boolean> = this.breakpointObserver.observe(Breakpoints.Handset)
.pipe(
map(result => result.matches),
shareReplay()
);
constructor(private breakpointObserver: BreakpointObserver) {}
2023-01-19 14:47:52 +01:00
}
2023-01-26 14:56:39 +01:00