app.controller('AppRootController',['$scope',function($scope){ $scope.isOpenMenu = false; $scope.toggleMenu = function(){ if($scope.isOpenMenu){ $scope.isOpenMenu = false; }else { $scope.isOpenMenu = true; } } }])