ciyidogan commited on
Commit
f92c1d7
·
verified ·
1 Parent(s): d20563d

Update flare-ui/src/main.ts

Browse files
Files changed (1) hide show
  1. flare-ui/src/main.ts +12 -7
flare-ui/src/main.ts CHANGED
@@ -1,17 +1,22 @@
1
  import { bootstrapApplication } from '@angular/platform-browser';
2
  import { provideRouter } from '@angular/router';
3
- import { provideHttpClient, withInterceptors } from '@angular/common/http';
4
  import { provideAnimations } from '@angular/platform-browser/animations';
 
 
 
5
  import { AppComponent } from './app/app.component';
6
  import { routes } from './app/app.routes';
7
- import { authInterceptor } from './app/interceptors/auth.interceptor';
8
 
9
  bootstrapApplication(AppComponent, {
10
  providers: [
11
  provideRouter(routes),
12
- provideHttpClient(
13
- withInterceptors([authInterceptor])
14
- ),
15
- provideAnimations()
 
 
 
16
  ]
17
- }).catch((err) => console.error(err));
 
1
  import { bootstrapApplication } from '@angular/platform-browser';
2
  import { provideRouter } from '@angular/router';
 
3
  import { provideAnimations } from '@angular/platform-browser/animations';
4
+ import { provideHttpClient, withInterceptors, HTTP_INTERCEPTORS } from '@angular/common/http';
5
+ import { importProvidersFrom } from '@angular/core';
6
+
7
  import { AppComponent } from './app/app.component';
8
  import { routes } from './app/app.routes';
9
+ import { LoadingInterceptor } from './app/interceptors/loading.interceptor';
10
 
11
  bootstrapApplication(AppComponent, {
12
  providers: [
13
  provideRouter(routes),
14
+ provideAnimations(),
15
+ provideHttpClient(),
16
+ {
17
+ provide: HTTP_INTERCEPTORS,
18
+ useClass: LoadingInterceptor,
19
+ multi: true
20
+ }
21
  ]
22
+ });