my json responce is {isVimeo = true } in angular js
<div ng-show={{isVimeo}}>
----
----
------
</div>
I want to show this div when isVimeo is true,but it is not display at my html.when i click inspect element in my html page the following code is there
<div ng-show="true" class="ng-hide">
</div>
when i remove the ng-hide
class in inspect element it is displaying.By default it is not displayong
Can anyone help!
Thanks!
<div ng-show="isVimeo">
并确保$ scope.isVimeo在当前范围内设置为true。
angular.module('testApp',[]).controller('testCTRL',function($scope) { $scope.wantToShow = true; $scope.dontShow = false; });
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script> <head>ng-show example:</head> <body data-ng-app="testApp"> <div data-ng-controller="testCTRL"> <br> <b>ng-show is true:</b> <span data-ng-show="wantToShow"> It is showing this becuase ng-show is true</span> <br><br> <b>ng-show is false(So,nothing we are showing):</b> <p data-ng-show="dontShow">It is showing this becuase ng-show is true</p> </div> </body>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.