Skip to content

Instantly share code, notes, and snippets.

@danielcrisp
Created July 25, 2017 13:31
Show Gist options
  • Save danielcrisp/c9b7c995677706e6871edda5f329669d to your computer and use it in GitHub Desktop.
Save danielcrisp/c9b7c995677706e6871edda5f329669d to your computer and use it in GitHub Desktop.
TokenInterceptor.intercept - Async HTTP Interceptors with Angular 4
// THIS DOESN'T WORK!
intercept (request, next) {
this.auth.getUser().then(user => {
// ... modify the request here ...
next.handle(request);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment