-6ren">
gpt4 book ai didi

javascript - Angular 1 : multiple conditions with multiple conditions OR how to exclude conditions if other conditions are true

转载 作者:行者123 更新时间:2023-11-30 15:47:24 26 4
gpt4 key购买 nike

现在我已经创建了一个额外的跨度来容纳一个条件。

<div ng-repeat="(key, resultLinks) in resultGroup.resultLinks">
<div ng-if="key < 4 || viewMore" ng-repeat="(subKey, linksWrap) in resultLinks.linksWrap">
<span ng-if="wWidth > 568 || subKey == 0" ng-repeat="links in linksWrap.links">
{{links.linkName}}
</span>
</div>
</div>

您将如何更改它以便所有条件都在一个 div 中。即:ng-if="(key < 4 || viewMore) || (wWidth > 568 || subKey == 0)"(类似这样,但不完全是)。例如,如果另一个条件为真,是否有可能以某种方式排除一个条件?

最佳答案

这是您要找的吗?

(key < 4 || viewMore) && (wWidth > 568 || subKey == 0)

关于javascript - Angular 1 : multiple conditions with multiple conditions OR how to exclude conditions if other conditions are true,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39857884/

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