我无法在angular material 7中隐藏angular flex布局中的div行。请找到我的以下代码。
<div fxLayout="column" class="dashboard-fx">
<div fxLayout="row" fxLayoutAlign="start start" fxLayoutGap="5px"
class="dashboard-pie">
some code here
</div>
<div fxLayout="row" fxLayoutAlign="start start" fxLayoutGap="5px"
[ngStyle]="{display: (subsectionData.length == 0) ? 'none' : 'block'}">
some code here
</div>
<div fxLayout="row" class="list-section" fxLayoutAlign="start start"
fxLayoutGap="5px" [ngStyle]="{display: (vsectionData.length == 0)? 'none':'block'}">
some code here
</div>
</div>在我的例子中,*ngIf是不可取的,因为如果我使用ngIf,元素将从
发布于 2020-11-08 23:32:58
fxShow还是fxHide?
<div fxLayout="column" class="dashboard-fx">
<div
fxLayout="row"
fxLayoutAlign="start start"
fxLayoutGap="5px"
class="dashboard-pie"
>
some code here
</div>
<div
fxLayout="row"
fxLayoutAlign="start start"
fxLayoutGap="5px"
[fxShow]="subsectionData.length"
>
some code here
</div>
<div
fxLayout="row"
class="list-section"
fxLayoutAlign="start start"
fxLayoutGap="5px"
[fxShow]="vsectionData.length"
>
some code here
</div>
</div>https://stackoverflow.com/questions/64738888
复制相似问题