Skip to content

Instantly share code, notes, and snippets.

@CiscoKidxx
Created November 11, 2015 17:55
Show Gist options
  • Save CiscoKidxx/3429944d87b16f852494 to your computer and use it in GitHub Desktop.
Save CiscoKidxx/3429944d87b16f852494 to your computer and use it in GitHub Desktop.
angular.module('app').controller('Login', function ($scope, $auth, $location, AuthService) {
$scope.isAuthenticated = $auth.isAuthenticated;
$scope.user = AuthService.currentUser;
console.log(AuthService.currentUser);
$scope.logout = function () {
$auth.logout()
.then(function(res) {
$location.path('/')
})
.catch(function(res) {
console.log(res);
})
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment