Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<body>
<div ng-app="myApp" ng-controller="myCtrl">
<button ng-click="myFunc()">Click Me!</button>
<div ng-show="showMe">
    <h1>Menu:</h1>
    <div>Pizza</div>
    <div>Pasta</div>
    <div>Pesce</div>
</div>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
    $scope.showMe = false;
    $scope.myFunc = function() {
        $scope.showMe = !$scope.showMe;
    }
});
</script>
<p>Click the button to show/hide the menu.</p>
</body>
<!-- Mirrored from www.w3schools.com/angular/tryit.asp?filename=try_ng_events_toggle by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 21 Dec 2022 17:17:18 GMT -->
</html>