ng-repeat and ui-if

烂漫一生 提交于 2020-01-21 11:49:12

问题


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?

Edit:

<ng-repeat><div ui-if>...

Is not possible (for now) unfortunately.

I know that I can combine ng-show and ng-repeat, but it's not the same.

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.


回答1:


I think that a filter should be used instead of ui-if.




回答2:


ui-if was removed at least from latest version angular-ui but since angular 1.1.5 you have ng-if build-in.



来源:https://stackoverflow.com/questions/15324890/ng-repeat-and-ui-if

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!