Skip to content
Snippets Groups Projects
app.module.ts 2.61 KiB
Newer Older
  • Learn to ignore specific revisions
  • Alex ORLUC's avatar
    Alex ORLUC committed
    import { BrowserModule } from '@angular/platform-browser';
    import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
    
    Alex ORLUC's avatar
    Alex ORLUC committed
    import { FormsModule, ReactiveFormsModule } from '@angular/forms';
    
    Alex ORLUC's avatar
    Alex ORLUC committed
    import { HttpClientModule } from '@angular/common/http';
    import { RouterModule } from '@angular/router';
    import { NgModule } from '@angular/core';
    import { HammerGestureConfig, HAMMER_GESTURE_CONFIG } from '@angular/platform-browser';
    import { PdfViewerModule } from 'ng2-pdf-viewer';
    import { ScrollEventModule } from 'ngx-scroll-event';
    import { AngularDraggableModule } from 'angular2-draggable';
    
    Alex ORLUC's avatar
    Alex ORLUC committed
    import { AppMaterialModule } from './app-material.module';
    
    // COMPONENTS
    
    Alex ORLUC's avatar
    Alex ORLUC committed
    import { AppComponent } from './app.component';
    
    Alex ORLUC's avatar
    Alex ORLUC committed
    import { LoginComponent } from './login/login.component';
    
    Alex ORLUC's avatar
    Alex ORLUC committed
    import { SignaturesComponent } from './signatures/signatures.component';
    import { SignaturePadPageComponent } from './pad/pad.component';
    import { SignaturePadModule } from 'angular2-signaturepad';
    import { DrawerComponent } from './drawer/drawer.component';
    
    Alex ORLUC's avatar
    Alex ORLUC committed
    import { DocumentComponent,
      WarnModalComponent,
      ConfirmModalComponent,
      SuccessInfoValidBottomSheetComponent,
      RejectInfoBottomSheetComponent } from './document/document.component';
    
    Alex ORLUC's avatar
    Alex ORLUC committed
    import { SidebarComponent } from './sidebar/sidebar.component';
    
    // SERVICES
    import { SignaturesContentService } from './service/signatures.service';
    
    Florian Azizian's avatar
    Florian Azizian committed
    
    
    
    @NgModule({
    
    Alex ORLUC's avatar
    Alex ORLUC committed
      declarations: [
        AppComponent,
    
    Alex ORLUC's avatar
    Alex ORLUC committed
        LoginComponent,
    
    Alex ORLUC's avatar
    Alex ORLUC committed
        SignaturesComponent,
        SignaturePadPageComponent,
        DrawerComponent,
        DocumentComponent,
        SidebarComponent,
        WarnModalComponent,
        ConfirmModalComponent,
        SuccessInfoValidBottomSheetComponent,
        RejectInfoBottomSheetComponent,
      ],
      imports: [
    
    Alex ORLUC's avatar
    Alex ORLUC committed
        FormsModule,
        ReactiveFormsModule,
    
    Alex ORLUC's avatar
    Alex ORLUC committed
        BrowserModule,
        BrowserAnimationsModule,
        HttpClientModule,
        RouterModule,
        SignaturePadModule,
        PdfViewerModule,
        ScrollEventModule,
        AngularDraggableModule,
        AppMaterialModule,
    
    Alex ORLUC's avatar
    Alex ORLUC committed
        RouterModule.forRoot([
    
    Alex ORLUC's avatar
    Alex ORLUC committed
          { path: 'document/:id', component: DocumentComponent},
          { path: 'document', component: DocumentComponent},
    
    Alex ORLUC's avatar
    Alex ORLUC committed
          { path: 'login', component: LoginComponent},
    
    Alex ORLUC's avatar
    Alex ORLUC committed
          { path: '**',   redirectTo: 'document', pathMatch: 'full' },
    
    Alex ORLUC's avatar
    Alex ORLUC committed
        ], { useHash: true }),
    
    Alex ORLUC's avatar
    Alex ORLUC committed
      ],
      entryComponents: [
        WarnModalComponent,
        ConfirmModalComponent,
        SuccessInfoValidBottomSheetComponent,
        RejectInfoBottomSheetComponent,
        SignaturesComponent
      ],
      providers: [SignaturesContentService,
        {
        provide: HAMMER_GESTURE_CONFIG,
        useClass: HammerGestureConfig
        }],
    
    Alex ORLUC's avatar
    Alex ORLUC committed
        exports: [
            RouterModule
        ],
    
    Alex ORLUC's avatar
    Alex ORLUC committed
      bootstrap: [AppComponent]
    
    Florian Azizian's avatar
    Florian Azizian committed
    })
    export class AppModule { }