Skip to content
Snippets Groups Projects
app.module.ts 4.16 KiB
Newer Older
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { LOCALE_ID, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ToastrModule } from 'ngx-toastr';
import { AppRoutingModule } from './app-routing.module';
import { ServiceWorkerModule } from '@angular/service-worker';
import { environment } from '../environments/environment';
import { AnnuaireComponent } from './annuaire/annuaire.component';
import { FilterModalComponent } from './annuaire/filter-modal/filter-modal.component';
import { ResultListComponent } from './annuaire/result-list/result-list.component';
import { SearchBarComponent } from './annuaire/search-bar/search-bar.component';
Hugo SUBTIL's avatar
Hugo SUBTIL committed
import { AppComponent } from './app.component';
import { CartoModule } from './carto/carto.module';
import { CustomBreakPointsProvider } from './config/custom-breakpoint';
import { CustomHttpInterceptor } from './config/http-interceptor';
import { ContactComponent } from './contact/contact.component';
Hugo SUBTIL's avatar
Hugo SUBTIL committed
import { FooterComponent } from './footer/footer.component';
import { FormViewModule } from './form/form-view/form-view.module';
import { OrientationModule } from './form/orientation-form-view/orientation.module';
import { AdminGuard } from './guards/admin.guard';
import { AuthGuard } from './guards/auth.guard';
import { DeactivateGuard } from './guards/deactivate.guard';
import { RoleGuard } from './guards/role.guard';
Hugo SUBTIL's avatar
Hugo SUBTIL committed
import { HeaderComponent } from './header/header.component';
import { LegalNoticeComponent } from './legal-notice/legal-notice.component';
import { LoginComponent } from './login/login.component';
import { MapModule } from './map/map.module';
import { NewsletterSubscriptionComponent } from './newsletter-subscription/newsletter-subscription.component';
import { PageComponent } from './page/page.component';
import { ResetEmailComponent } from './reset-email/reset-email.component';
import { ResetPasswordComponent } from './reset-password/reset-password.component';
import { StructureResolver } from './resolvers/structure.resolver';
import { TempUserResolver } from './resolvers/temp-user.resolver';
import { RouterListenerService } from './services/routerListener.service';
Hugo SUBTIL's avatar
Hugo SUBTIL committed
import { UpdateService } from './services/update.service';
import { DataShareConsentComponent } from './shared/components/data-share-consent/data-share-consent.component';
import { SharedModule } from './shared/shared.module';
import { StructureDetailsComponent } from './structure-list/components/structure-details/structure-details.component';
import { StructureListSearchPrintComponent } from './structure-list/components/structure-list-search-print/structure-list-search-print.component';
import { StructureExcludeComponent } from './structure/structure-exclude/structure-exclude.component';
import { StructureJoinComponent } from './structure/structure-join/structure-join.component';
Hugo SUBTIL's avatar
Hugo SUBTIL committed

@NgModule({
  declarations: [
    AppComponent,
    HeaderComponent,
    FooterComponent,
    StructureDetailsComponent,
    LegalNoticeComponent,
    ContactComponent,
    ResetPasswordComponent,
    StructureJoinComponent,
    NewsletterSubscriptionComponent,
    StructureExcludeComponent,
    AnnuaireComponent,
    SearchBarComponent,
    ResultListComponent,
    FilterModalComponent,
    StructureListSearchPrintComponent,
Jérémie BRISON's avatar
Jérémie BRISON committed
  ],
  imports: [
    BrowserModule,
    HttpClientModule,
    AppRoutingModule,
    SharedModule,
    BrowserAnimationsModule,
    ToastrModule.forRoot(),
Hugo SUBTIL's avatar
Hugo SUBTIL committed
    ServiceWorkerModule.register('ngsw-worker.js', {
      enabled: environment.production,
    }),
  providers: [
    { provide: LOCALE_ID, useValue: 'fr' },
    { provide: HTTP_INTERCEPTORS, useClass: CustomHttpInterceptor, multi: true },
    CustomBreakPointsProvider,
    AuthGuard,
    AdminGuard,
    TempUserResolver,
    RouterListenerService,
Hugo SUBTIL's avatar
Hugo SUBTIL committed
    UpdateService,
  bootstrap: [AppComponent],
Hugo SUBTIL's avatar
Hugo SUBTIL committed
})
export class AppModule {}