Skip to content

Instantly share code, notes, and snippets.

@simonmorley
Created January 21, 2015 13:43
Show Gist options
  • Save simonmorley/bfa0e925b48497902e7c to your computer and use it in GitHub Desktop.
Save simonmorley/bfa0e925b48497902e7c to your computer and use it in GitHub Desktop.
medium, creating a login screen, simple redirect function
var redirectUser = function() {
if ( attrs.redirects !== undefined) {
var redirects = JSON.parse(attrs.redirects);
if (redirects.show_welcome) {
$location.path('/welcome');
} else if (redirects.success_url) {
$location.path(redirects.success_url);
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment