Angularjs 如何将ng if更改为ng show in ui select
Angularjs 如何将ng if更改为ng show in ui select,angularjs,ui-select,Angularjs,Ui Select,玩具 如果在选项标签中,我想使用ng show而不是ng,因为我需要显示/隐藏这个dom,而不是删除它。我应该怎么做? 添加:angularjs--1.4.8UI选择--0.13.2 我刚刚改变了指令本身。现在,选项加载为ng show,而不是ng if 在项目的附加select.js(ui select dist文件)中, 搜索下面的行 choices.attr('ng-repeat', parserResult.repeatExpression(groupByExp))
玩具
如果在选项标签中,我想使用ng show而不是ng,因为我需要显示/隐藏这个dom,而不是删除它。我应该怎么做?
添加:angularjs--1.4.8UI选择--0.13.2我刚刚改变了指令本身。现在,选项加载为ng show,而不是ng if
在项目的附加select.js(ui select dist文件)中, 搜索下面的行
choices.attr('ng-repeat', parserResult.repeatExpression(groupByExp))
.attr('ng-if', '$select.open');
及
及
非常感谢。但是我不想修改源代码,因为如果在另一个选择列表中,我需要ng。还有其他方法吗?
choices.attr('ng-repeat', parserResult.repeatExpression(groupByExp))
.attr('ng-if', '$select.open');
<abbr ng-if=\"$select.allowClear && !$select.isEmpty()\"
choices.attr('ng-repeat', parserResult.repeatExpression(groupByExp))
.attr('ng-show', '$select.open');
<abbr ng-show=\"$select.allowClear && !$select.isEmpty()\"