[英]Angular material - sidenav component not working correctly
您可以使用Host Listener
來監聽窗口大小調整事件並在您的應用程序中進行以下更改。
@HostListener('window:resize', ['$event'])
onResize(event) {
event.target.innerWidth < 400 ? this.sideNavButtonVisible = true : this.sideNavButtonVisible = false;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.