demo
<script>
function TestDisply($scope){
$scope.DivState.show=false;
$scope.toggleMenu=function(){
$scope.DivState.show!= $scope.DivState.show;
}
}
</script>
demo
<html ng-app>
<head>
<title>test Show or Hide Menu of Angular</title>
</head>
<body ng-controller='TestDisply'>
<button ng-click="toggleMenu()">Toggle Menu</button>
<div ng-show="DivState.show" id="div1">
用属性ng-show显示或隐藏该div2,点击button 后。
</div>
<div ng-hide="DivState.show" id="div2">
用属性ng-hide显示或隐藏该div2,点击button 后。
</div>
</body>
<html/>