app.controller('AppRootController',['$scope','$window','$timeout',function($scope,$window,$timeout){ var window = angular.element($window); $scope.load = function(){ $timeout(function(){ var preloader = angular.element(document.querySelector('.preload-screen')); preloader.css('opacity','0'); },2700) $timeout(function(){ var preloader = angular.element(document.querySelector('.preload-screen')); preloader.css('display','none'); },3700) } $scope.isOpenMenu = false; $scope.toggleMenu = function(){ if($scope.isOpenMenu){ $scope.isOpenMenu = false; }else { $scope.isOpenMenu = true; } } }])