在我的angular代码中,我得到了一个数组集合。当我绑定到angular html代码时,我使用mat-list和mat-list-item逐列绑定。例如,我的网格列是按名称排列的。<div fxLayout="column" fxFlex> <mat-list-item *ngFor="let name of data">
{{name.firstname}
在我的Angular应用程序中,我的数据库中有maan字段。我在我的前端显示了两次这个字段的值。一个是静态的,而另一个值将会改变。我使用Angular本地存储来保存saveChanges函数中的动态值。>Static Value Amazon</mat-list-item>
<mat-list>{{latestData.maan}}</mat-list><mat-divider></mat-d
角度材质列表(mat- list )具有子元素(mat-list-item)。当它呈现列表时,它计算每个项目由多少行组成(基于css类"mat-line")。如果"mat-list-item“的内容来自一个有角度的子组件,它(mat-list)不会计算"mat-line”css类,也不会将"mat-2-line“类添加到"mat-list-item”中,布局看起来很糟糕以下是演示此问题的示例应用程序: https://stackblitz.co