mobile-web #2
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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';
|
||||||
|
Loading…
Reference in New Issue
Block a user