Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html ng-app="test">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>ng-if</title>
</head>
<body>
  <div ng-controller="testCtrl">
    <div ng-if="isShow">显示</div>
    <div ng-if="!isShow">隐藏</div>
    <div ng-show="isShow">显示</div>
    <div ng-show="!isShow">隐藏</div>
  </div>
</body>
</html>
 
angular.module('test',[])
  .controller('testCtrl',function($scope){
    $scope.isShow = true;
  
  });
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
aicekillerpro
0viewers