Started mobile web interface

This commit is contained in:
vesem 2021-08-04 07:03:25 -04:00
parent 44dea44cd5
commit 6e98776290
2 changed files with 3 additions and 1 deletions

View File

@ -43,6 +43,7 @@ export class HomeComponent implements OnInit, OnDestroy {
this.responsiveService.getMobileStatus().subscribe(isMobile => { this.responsiveService.getMobileStatus().subscribe(isMobile => {
this.isMobile = isMobile; this.isMobile = isMobile;
}) })
console.log(this.isMobile)
// this.responsiveService.checkWidth(); // this.responsiveService.checkWidth();
} }

View File

@ -19,12 +19,13 @@ export class ResponsiveService {
// tslint:disable-next-line:typedef // tslint:disable-next-line:typedef
getMobileStatus(): Observable<any> { getMobileStatus(): Observable<any> {
console.log(this.isMobile) // console.log(this.isMobile)
return this.isMobile.asObservable(); return this.isMobile.asObservable();
} }
// tslint:disable-next-line:typedef // tslint:disable-next-line:typedef
public checkWidth() { public checkWidth() {
console.log(window.innerWidth)
// tslint:disable-next-line:prefer-const // tslint:disable-next-line:prefer-const
if (window.innerWidth <= 768) { if (window.innerWidth <= 768) {
this.screenWidth = 'sm'; this.screenWidth = 'sm';