Last active
August 29, 2015 14:16
-
-
Save lamba/c275f5f010090632209e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular | |
.module('...', [...]) | |
... | |
.controller('SomeController', ['$scope', '$location', LoggedInUser]) | |
.factory('Util', Util); | |
function Util($scope, $location, LoggedInUser) { | |
console.log('logout'); | |
return { | |
logout: function() { | |
LoggedInUser.setEmail(''); | |
console.log('LoggedInUser.getEmail()='+LoggedInUser.getEmail()); | |
$location.path('#home'); | |
} | |
}; | |
}; | |
function SomeController($scope, $location, LoggedInUser) { | |
... | |
Util.logout($scope, $location, LoggedInUser); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment