0

我正在尝试将 . 问题是我试图应用的任何规则都不会改变任何东西。如果我将 fxFlex 规则添加到一切似乎都可以正常工作。我试图为每个元素应用规则,但仍然没有任何线索。

没有任何规则的sidenav代码:

<mat-sidenav-container>

    <mat-sidenav #sidenav opened mode="side">
        <div *ngIf="rooms">
            <div class="mat-title">OBJECTS:</div>
            <mat-nav-list *ngFor="let room of rooms ;trackBy: trackId">
                <a mat-list-item [routerLink]="['/select/room', room.id, 'device' ]">
                    <span class="mat-body-1">{{room.roomName}}</span>
                </a>
            </mat-nav-list>
        </div>
    </mat-sidenav>

    <mat-sidenav-content fxLayout="column" fxLayoutAlign="center center">
    ...
    </mat-sidenav-content>

</mat-sidenav-container>

屏幕 在此处输入图像描述

4

1 回答 1

0

如果您有延迟加载模块,则需要在该模块上导入 FlexLayoutModule

于 2020-02-28T01:10:08.487 回答