Skip to content

Instantly share code, notes, and snippets.

@SimplGy
Created September 14, 2018 18:39
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SimplGy/64f9e64afd4d7af2e6e9befced7878c1 to your computer and use it in GitHub Desktop.
Save SimplGy/64f9e64afd4d7af2e6e9befced7878c1 to your computer and use it in GitHub Desktop.
@Injectable({providedIn: 'root'})
export class ExternalUrlService implements CanActivate {
canActivate({ data }: ActivatedRouteSnapshot): boolean {
window.open(data.externalUrl, '_blank');
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment