AngularJS: ng-if boolean condition doesn't work?

浪子不回头ぞ 提交于 2019-12-21 10:39:08

问题


Why ng-if doesn't work for me in this example but ng-show does JSFiddle:

<div ng-if="false">text</div>
<div ng-show="false">text2</div>

and how to fix that?


回答1:


ngIf is a new directive added in v1.1.5. JSFiddle has you on 1.1.1.



来源:https://stackoverflow.com/questions/16777152/angularjs-ng-if-boolean-condition-doesnt-work

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