<!DOCTYPE html>
<html lang="en" ng-app="start">
<head>
<meta charset="UTF-8">
<title>ng-hide ng-show</title>
<script type="text/javascript" src="js/angular.min.js"></script>
</head>
<body>
<div ng-controller='DeathrayMenuController'>
<button ng-click='toggleMenu()'>Toggle Menu</button>
<ul ng-show='menuState.show'>
<li>Stun</li>
<li>Disintegrate</li>
<li>Erase from history</li>
</ul>
</div>
<script type="text/javascript">
angular.module('start',[])
.controller('DeathrayMenuController',function($scope){
$scope.menuState={
show:false
};
$scope.toggleMenu=function(){
$scope.menuState.show = !$scope.menuState.show;
}
})
</script>
</body>
</html>
<html lang="en" ng-app="start">
<head>
<meta charset="UTF-8">
<title>ng-hide ng-show</title>
<script type="text/javascript" src="js/angular.min.js"></script>
</head>
<body>
<div ng-controller='DeathrayMenuController'>
<button ng-click='toggleMenu()'>Toggle Menu</button>
<ul ng-show='menuState.show'>
<li>Stun</li>
<li>Disintegrate</li>
<li>Erase from history</li>
</ul>
</div>
<script type="text/javascript">
angular.module('start',[])
.controller('DeathrayMenuController',function($scope){
$scope.menuState={
show:false
};
$scope.toggleMenu=function(){
$scope.menuState.show = !$scope.menuState.show;
}
})
</script>
</body>
</html>