【问题标题】:Angular flex layout how to conditionally add fxLayoutAlignAngular flex布局如何有条件地添加fxLayoutAlign
【发布时间】:2025-11-27 04:50:02
【问题描述】:

这是我的代码

<div fxLayout="row"
     fxLayoutAlign="end center">

我想给 fxLayoutAlign 添加一个条件。我不知道该怎么做。谁能帮忙?

我尝试了以下方法:

<div fxLayout="row"
     fxLayoutAlign="isCondition? 'start center' : 'end center'">

但没有任何效果

谢谢

【问题讨论】:

    标签: angular6 angular-flex-layout


    【解决方案1】:

    这对我有用。 我在方括号中使用了 propertyBinding。

    【讨论】:

      最近更新 更多