app.controller('HomeController', ['$scope', 'Auth', 'localStorageService', '$location', '$rootScope', function ($scope, Auth, localStorageService, $location, $rootScope) { var vm = this; vm.signOut = function () { localStorageService.remove('userAuth'); $location.path('/splash-page'); }; function userAuth() { return JSON.parse(localStorageService.get('userAuth')); } }]);