You can use window.screen.width.
Example:
ngOnInit() {
if (window.screen.width === 360) { // 768px portrait
this.mobile = true;
}
}
Html:
<button *ngIf="mobile" (click)="showHide = !showMap"></button>
You can use window.screen.width.
Example:
ngOnInit() {
if (window.screen.width === 360) { // 768px portrait
this.mobile = true;
}
}
Html:
<button *ngIf="mobile" (click)="showHide = !showMap"></button>