Skip to content
Snippets Groups Projects
Unverified Commit 518d173f authored by florimondmanca's avatar florimondmanca
Browse files

remove loader interceptor

parent 9d770bb7
Branches
No related tags found
3 merge requests!22to be tested,!23Affichage d'une progress bar lors de la navigation,!26Release first-users version to production
......@@ -6,7 +6,6 @@ import { HTTP_INTERCEPTORS } from '@angular/common/http';
import { MarkdownModule, MarkdownComponent, MarkdownPipe } from 'ngx-markdown';
import { TokenInterceptor } from './auth';
import { LoaderService } from './loader.service';
import { LoaderInterceptor } from './loader.interceptor';
import { MessageModule } from './messages';
import { FuzzyPipe, LineBreaksPipe } from './pipes';
import { NotFoundComponent } from './not-found';
......@@ -33,7 +32,6 @@ import { ErrorPageComponent } from './error-page';
providers: [
LoaderService,
{ provide: HTTP_INTERCEPTORS, useClass: TokenInterceptor, multi: true },
{ provide: HTTP_INTERCEPTORS, useClass: LoaderInterceptor, multi: true },
],
exports: [
MessageModule,
......
import { Injectable } from '@angular/core';
import { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/common/http';
import { Observable } from 'rxjs';
import { tap } from 'rxjs/operators';
import { LoaderService } from './loader.service';
@Injectable()
export class LoaderInterceptor implements HttpInterceptor {
constructor(private loaderService: LoaderService) { }
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
// this.loaderService.loading$.next(true);
return next.handle(request).pipe(
// tap(() => this.loaderService.loading$.next(false)),
);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment