Angular Incorrect Margin-Left Applied To Sidenav Content

后端 未结 5 779
清歌不尽
清歌不尽 2021-01-12 22:30

I have an Angular project using Angular Material but I\'m running into a bug where sometimes the mat-sidenav-content has a margin-left: 365px; appl

5条回答
  •  难免孤独
    2021-01-12 23:24

    This error is due to the icons. After a reload (clear cache) with slow connection, angular will start to render the string with the name of the icon. Since the string is larger than the fully rendered icon, there will be extra space. After a reload, since the icon is already on the device storage, this does not happen.

    My solution was to fix the value of the sidebar width inline.

提交回复
热议问题