Skip to content

Instantly share code, notes, and snippets.

@unicodeveloper
Created September 12, 2016 16:32
Show Gist options
  • Save unicodeveloper/d7ea83a64146d0b88861add126974ad9 to your computer and use it in GitHub Desktop.
Save unicodeveloper/d7ea83a64146d0b88861add126974ad9 to your computer and use it in GitHub Desktop.
Cloudinary Blog Post - Part 1
app.controller('LogoutCtrl', function($location, $auth, toastr) {
if (!$auth.isAuthenticated()) { return; }
$auth.logout()
.then(function() {
toastr.info('You have been logged out');
$location.path('/');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment