在 AngularJS 中,ng-show 函数在 div 部分中不起作用
ng-show="false"
这是它的代码http://plnkr.co/edit/jEuOmxR67kwO8tOeSz3g?p=preview 正如你在第 84 行中看到的那样,我已经包含了 ng-show 但它仍然显示在输出中。
在 AngularJS 中,ng-show 函数在 div 部分中不起作用
ng-show="false"
这是它的代码http://plnkr.co/edit/jEuOmxR67kwO8tOeSz3g?p=preview 正如你在第 84 行中看到的那样,我已经包含了 ng-show 但它仍然显示在输出中。
您错过了在根元素中定义 ng-app 。
<html ng-app="">
您没有将其初始化为角度应用程序。在第二行中将其设置为<html ng-app="">
您缺少在此处包含默认的 ng-hide 类。请尝试包含值为 ng-hide 的类。
<div ng-show="false" class="ng-hide">
更新了 plunker http://plnkr.co/edit/y7EMzX8gCw39WT9amyfO?p=info。