// create the controller and inject Angular's $scope scotchApp.controller('leftMenuController', // create a message to display in our view function($scope ,$location ,$route,commonService) { //alert("leftMenuController"); init(); function init() { } $scope.printing = function(url){ alert("printing"+ url+"/"+new Date().getTime() ); commonService.setUrlPath(url+"/"+new Date().getTime()); $location.path(url+"/"+new Date().getTime()); $scope.$apply(); }; $scope.redirectMainPage = function(url){ commonService.setUrlPath(url+"/"+new Date().getTime()); $location.path(url+"/"+new Date().getTime()); $scope.$apply(); }; $scope.doLogout = function () { commonService.setUrlPath("/logout"); $location.path("/logout"); }; });