Skip to content
Snippets Groups Projects
app-common.module.ts 4.11 KiB
Newer Older
  • Learn to ignore specific revisions
  • import { CommonModule }                         from '@angular/common';
    
    import { NgModule }                             from '@angular/core';
    
    /*CORE IMPORTS*/
    
    Alex ORLUC's avatar
    Alex ORLUC committed
    import { BrowserModule, HammerGestureConfig, HAMMER_GESTURE_CONFIG }   from '@angular/platform-browser';
    
    import { BrowserAnimationsModule }              from '@angular/platform-browser/animations';
    import { FormsModule, ReactiveFormsModule }     from '@angular/forms';
    import { HttpClientModule }                     from '@angular/common/http';
    import { RouterModule }                         from '@angular/router';
    
    import { DragDropModule }                         from '@angular/cdk/drag-drop';
    
    /*PLUGINS IMPORTS*/
    
    import { PdfViewerModule }                      from 'ng2-pdf-viewer';
    //import { SimplePdfViewerModule }                from 'simple-pdf-viewer';
    
    import { NgStringPipesModule }                  from 'ngx-pipes';
    
    import { CookieService }                        from 'ngx-cookie-service';
    
    import { TimeAgoPipe }                          from '../plugins/timeAgo.pipe';
    
    import { TimeLimitPipe }                        from '../plugins/timeLimit.pipe';
    import { FilterListPipe }                       from '../plugins/filterList.pipe';
    
    /*FRONT IMPORTS*/
    import { AppMaterialModule }                    from './app-material.module';
    
    
    import { SmdFabSpeedDialComponent,SmdFabSpeedDialTrigger, SmdFabSpeedDialActions, }             from '../plugins/fab-speed-dial';
    
    
    /*MENU COMPONENT*/
    
    import { HeaderRightComponent }                 from './header/header-right.component';
    import { HeaderLeftComponent }                  from './header/header-left.component';
    import { HeaderPanelComponent }                  from './header/header-panel.component';
    
    import { MainHeaderComponent }                  from './menu/main-header.component';
    
    import { MenuComponent }                        from './menu/menu.component';
    import { MenuNavComponent }                     from './menu/menu-nav.component';
    
    import { MenuShortcutComponent, IndexingGroupModalComponent }                from './menu/menu-shortcut.component';
    
    Florian Azizian's avatar
    Florian Azizian committed
    /*SEARCH*/
    import { SearchHomeComponent }                        from './search/search-home.component';
    
    /*SEARCH*/
    import { BasketHomeComponent }                        from './basket/basket-home.component';
    
    Alex ORLUC's avatar
    Alex ORLUC committed
    
    export class MyHammerConfig extends HammerGestureConfig {
        overrides = <any> {
            'pinch': { enable: false },
            'rotate': { enable: false }
        }
    }
    
    @NgModule({
        imports: [
            CommonModule,
            BrowserModule,
            BrowserAnimationsModule,
            FormsModule,
            HttpClientModule,
            RouterModule,
    
            NgStringPipesModule,
    
            AppMaterialModule,
    
            DragDropModule
    
        ],
        declarations: [
    
            MenuComponent,
            MenuNavComponent,
    
            MenuShortcutComponent,
    
            HeaderRightComponent,
            HeaderLeftComponent,
            HeaderPanelComponent,
    
    Florian Azizian's avatar
    Florian Azizian committed
            SearchHomeComponent,
            BasketHomeComponent,
    
            TimeAgoPipe,
            TimeLimitPipe,
            FilterListPipe,
    
            IndexingGroupModalComponent,
            SmdFabSpeedDialComponent,
            SmdFabSpeedDialTrigger,
            SmdFabSpeedDialActions,
    
        ],
        exports: [
            CommonModule,
    
            MenuComponent,
            MenuNavComponent,
    
            HeaderRightComponent,
            HeaderLeftComponent,
            HeaderPanelComponent,
    
    Florian Azizian's avatar
    Florian Azizian committed
            SearchHomeComponent,
            BasketHomeComponent,
    
            BrowserModule,
            BrowserAnimationsModule,
            FormsModule,
            ReactiveFormsModule,
            HttpClientModule,
            RouterModule,
    
            AppMaterialModule,
    
            TimeAgoPipe,
            TimeLimitPipe,
    
            NgStringPipesModule,
    
            SmdFabSpeedDialComponent,
            SmdFabSpeedDialTrigger,
            SmdFabSpeedDialActions,
    
            DragDropModule
    
        providers: [
    
    Alex ORLUC's avatar
    Alex ORLUC committed
            CookieService,
            {
                provide: HAMMER_GESTURE_CONFIG,
                useClass: MyHammerConfig
            }
    
        entryComponents: [
            IndexingGroupModalComponent
        ],
    
    })
    export class SharedModule { }