NG-重复和UI-IF [英] ng-repeat and ui-if
本文介绍了NG-重复和UI-IF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我想用UI-IF(anguluarUi)与NG-重复(我认为这将是最有用那里)我得到一个错误:
When I want to use ui-if (anguluarUi) with ng-repeat (and I think it would be most useful there) I Get an error:
Error: Multiple directives [uiIf, ngRepeat] asking for transclusion on: <!-- uiIf: oConnection.aOptions -->
有什么办法把这两个结合起来?
Is there any way to combine those two?
编辑:
<ng-repeat><div ui-if>...
是不可能的(现在)很可惜。
Is not possible (for now) unfortunately.
我知道我可以结合NG-展示和NG-重复,但它是不一样的。
I know that I can combine ng-show and ng-repeat, but it's not the same.
我也不想把UI,如果重复之外,我想用重复的值的条件。
I also don't want to put the ui-if outside of the repeat, as I want to use the values of the repeat for the condition.
推荐答案
我觉得一个过滤器用来代替UI-IF。
I think that a filter should be used instead of ui-if.
这篇关于NG-重复和UI-IF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文