gpt4 book ai didi

javascript - 如何更改有关 if else 语句的 Angular fxLayout(行到列)

转载 作者:行者123 更新时间:2023-11-30 20:30:18 25 4
gpt4 key购买 nike

https://tburleson-layouts-demos.firebaseapp.com/#/docs

我如何设定某个值的方向

<div if(value) fxLayout='row' else fxLayout='column'>

最佳答案

我只是认为这足以回答您的问题:

  1. 组件中的代码:this.anyVal = true; // use any logic here to set this value

  2. 模板中的元素:<div fxLayout="{{anyVal ? 'column' : 'row'}}">

祝你好运!

关于javascript - 如何更改有关 if else 语句的 Angular fxLayout(行到列),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50415956/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com