问题
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