@angular/core#NgModule TypeScript Examples

The following examples show how to use @angular/core#NgModule. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: app.module.ts    From one-platform with MIT License 6 votes vote down vote up
@NgModule({
  declarations: [AppComponent],
  imports: [
    BrowserModule,
    AppRoutingModule,
    GraphQLModule,
    HttpClientModule,
    SharedModule,
    BrowserAnimationsModule,
  ],
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
  providers: [],
  bootstrap: [AppComponent],
})
export class AppModule {}
Example #2
Source File: app.module.ts    From 1hop with MIT License 6 votes vote down vote up
@NgModule({
    declarations: [
        AppComponent,
        MigrationComponent,
        BaseComponent,
        NoContentComponent,
        ImportComponent,
        ManageComponent,
        MigrateComponent
    ],
    imports: [
        BrowserAnimationsModule,
        AppRoutingModule,
        NgbAlertModule,
        NgbDropdownModule,
        FontAwesomeModule,
        NgbDropdownModule,
        FormsModule,
        NgbModule,
        HttpClientModule,
        LoadingSpinnerModule,
        ModalModule.forRoot(),
        NgbToastModule,
        ServiceWorkerModule.register('ngsw-worker.js', {
            enabled: navigator.userAgent.toLowerCase().indexOf('android') === -1 &&
                'serviceWorker' in navigator && environment.production
        }),
        FontAwesomeModule
    ],
    providers: [],
    bootstrap: [AppComponent]
})
export class AppModule {
}
Example #3
Source File: app.module.ts    From 1x.ag with MIT License 6 votes vote down vote up
@NgModule({
    declarations: [
        AppComponent,
        BaseComponent,
        NoContentComponent,
        HowItWorksComponent
    ],
    imports: [
        BrowserAnimationsModule,
        AppRoutingModule,
        FormsModule,
        NgbModule,
        HttpClientModule,
        LoadingSpinnerModule,
        ModalModule.forRoot(),
        DeviceDetectorModule.forRoot(),
        NgbToastModule,
        ServiceWorkerModule.register('ngsw-worker.js', {
            enabled: navigator.userAgent.toLowerCase().indexOf('android') === -1 &&
                'serviceWorker' in navigator && environment.production
        }),
        FontAwesomeModule,
        AngularPageVisibilityModule
    ],
    providers: [
        {provide: LocationStrategy, useClass: HashLocationStrategy}
    ],
    bootstrap: [AppComponent]
})
export class AppModule {
}
Example #4
Source File: app.module.ts    From gnosis.1inch.exchange with MIT License 6 votes vote down vote up
@NgModule({
    declarations: [
        AppComponent,
        SlippageSettingsComponent,
        GasSettingsComponent
    ],
    imports: [
        BrowserModule,
        AppRoutingModule,
        HttpClientModule,
        BrowserAnimationsModule,
        MatButtonModule,
        MatSelectModule,
        FormsModule,
        ReactiveFormsModule,
        MatInputModule,
        MatFormFieldModule,
        MatTooltipModule,
        MatIconModule,
        MatRadioModule,
        NgxWebstorageModule.forRoot(),
        MatAutocompleteModule,
        NgxMatSelectSearchModule,
        MatExpansionModule,
        FontAwesomeModule
    ],
    providers: [],
    bootstrap: [AppComponent]
})
export class AppModule {
}
Example #5
Source File: app.module.ts    From Uber-ServeMe-System with MIT License 6 votes vote down vote up
@NgModule({
  declarations: [
    AppComponent,
  ],
  entryComponents: [],
  imports: [
    BrowserModule, 
    IonicModule.forRoot({
      // toastEnter: customAlertEnter
    }), 
    AppRoutingModule,
    AngularFireModule.initializeApp(environment.firebase),
    AngularFirestoreModule, 
    AngularFireStorageModule,
    AngularFireAuthModule,
    HttpModule,
    AngularFireAuthModule,
    FirebaseUIModule.forRoot(firebaseUiAuthConfig),
  ],
  providers: [
    Keyboard,
    GoogleMaps,
    NativeStorage,
    GooglePlus,
    StatusBar,
    SplashScreen,
    UserService,
    AngularFirestore,
    { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
  ],
  bootstrap: [AppComponent]
})
export class AppModule {}
Example #6
Source File: app.module.ts    From ngx-photo-editor with MIT License 6 votes vote down vote up
// import {NgxPhotoEditorModule} from 'ngx-photo-editor';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    NgxPhotoEditorModule,
    MatInputModule,
    BrowserAnimationsModule,
    MatToolbarModule,
    MatIconModule,
    MatButtonModule,
    MatButtonToggleModule,
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
Example #7
Source File: app.module.ts    From Angular-Computer-Vision-Azure-Cognitive-Services with MIT License 6 votes vote down vote up
@NgModule({
  declarations: [
    AppComponent,
    OcrComponent,
    NavMenuComponent,
    HomeComponent
  ],
  imports: [
    BrowserModule,
    HttpClientModule,
    FormsModule,
    RouterModule.forRoot([
      { path: '', component: HomeComponent, pathMatch: 'full' },
      { path: 'computer-vision-ocr', component: OcrComponent },
    ], { relativeLinkResolution: 'legacy' })
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
Example #8
Source File: app.module.ts    From transformers-for-lawyers with Apache License 2.0 6 votes vote down vote up
@NgModule({
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    DataViewModule,
    PanelModule,
    MatGridListModule,
    ScrollPanelModule,
    DialogModule,
    DropdownModule,
    InputTextModule,
    ButtonModule,
    HttpClientModule,
    FormsModule,
    MatCardModule,
    MatNativeDateModule,
    TabViewModule,
    TabMenuModule,
    AccordionModule,
    BreadcrumbModule,
    CardModule,
    AppRoutingModule,
    ProgressBarModule
  ],
  declarations: [AppComponent, DocumentViewerComponent,
    SearchComponent, ReaderComponent,
    TaberComponent, SafeHtmlPipe, MenuComponent, FaqComponent, HomeComponent, AboutComponent, ProgressBarComponent],
  bootstrap: [AppComponent],
  providers: [DocumentViewService, DocumentViewerComponent]
})

export class AppModule { }
Example #9
Source File: app.module.ts    From angular-custom-material-paginator with MIT License 6 votes vote down vote up
@NgModule({
  declarations: [
    AppComponent,
    PaginatorDirective,
  ],
  imports: [
    BrowserModule,
    FormsModule,
    AppRoutingModule,
    MatFormFieldModule,
    MatPaginatorModule,
    BrowserAnimationsModule,
    HttpClientModule,
    MatTableModule
  ],
  providers: [],
  bootstrap: [AppComponent],
  exports: [PaginatorDirective]
})
export class AppModule { }
Example #10
Source File: app-routing.module.ts    From DocumentationWebPage with MIT License 6 votes vote down vote up
@NgModule({
    imports: [
        RouterModule.forRoot(appRoutes) 
    ],
    exports: [
        RouterModule 
    ]
})
export class AppRoutingModule { }
Example #11
Source File: app.module.ts    From bdc-walkthrough with MIT License 6 votes vote down vote up
@NgModule({
  declarations: [
    AppComponent,
    Example1Component,
    Example2Component,
    Example3Component,
    Example4Component,
    Example5Component,
    Example6Component,
    Example7Component
  ],
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    FormsModule,
    AppRoutingModule,
    MatIconModule,
    MatButtonModule,
    MatCheckboxModule,
    MatFormFieldModule,
    MatInputModule,
    MatDialogModule,
    BdcWalkModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
Example #12
Source File: app.module.ts    From TypeFast with MIT License 6 votes vote down vote up
@NgModule({
  declarations: [
    AppComponent,
    TyperComponent,
    TimePipe,
    PreferencesComponent,
    PopperDirective,
    IncorrectWordComponent,
    AboutComponent,
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpClientModule,
    MarkdownModule.forRoot({ loader: HttpClient }),
  ],
  providers: [WordService, PreferencesService, ThemeService, LanguageService],
  bootstrap: [AppComponent],
})
export class AppModule {
  constructor(private themeService: ThemeService) {}
}
Example #13
Source File: app.module.ts    From frontend-framework-showdown-2020 with MIT License 6 votes vote down vote up
@NgModule({
  declarations: [
    AppComponent,
    ImageSearchComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpClientModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
Example #14
Source File: app-routing.module.ts    From xBull-Wallet with GNU Affero General Public License v3.0 6 votes vote down vote up
@NgModule({
  imports: [RouterModule.forRoot(routes, {
    useHash: environment.platform !== 'website',
    preloadingStrategy: PreloadAllModules,
    // enableTracing: !environment.production
  })],
  exports: [RouterModule]
})
export class AppRoutingModule { }
Example #15
Source File: app-routing.module.ts    From rubic-app with GNU General Public License v3.0 6 votes vote down vote up
@NgModule({
  imports: [
    RouterModule.forRoot(routes, {
      onSameUrlNavigation: 'reload',
      relativeLinkResolution: 'legacy'
    })
  ],
  exports: [RouterModule]
})
export class AppRoutingModule {}
Example #16
Source File: app-routing.module.ts    From Angular-ActionStreams with MIT License 6 votes vote down vote up
@NgModule({
  imports: [
    RouterModule.forRoot([
    { path: 'welcome', component: WelcomeComponent },
    {
        path: 'products',
        data: { preload: false },
        loadChildren: () => import('./products/product.module').then(m => m.ProductModule)
    },
    { path: '', redirectTo: 'welcome', pathMatch: 'full' },
    { path: '**', component: PageNotFoundComponent }
], { relativeLinkResolution: 'legacy' })
  ],
  exports: [RouterModule]
})
export class AppRoutingModule { }
Example #17
Source File: app-routing.module.ts    From Angular-HigherOrderMapping with MIT License 6 votes vote down vote up
@NgModule({
  imports: [
    RouterModule.forRoot([
      { path: 'welcome', component: WelcomeComponent },
      {
        path: 'products',
        data: { preload: false },
        loadChildren: () =>
          import('./products/product.module').then(m => m.ProductModule)
      },
      { path: '', redirectTo: 'welcome', pathMatch: 'full' },
      { path: '**', component: PageNotFoundComponent }
    ])
  ],
  exports: [RouterModule]
})
export class AppRoutingModule { }
Example #18
Source File: core.module.ts    From ng-devui-admin with MIT License 6 votes vote down vote up
@NgModule({
  declarations: [],
  imports: [CommonModule],
})
export class CoreModule {
  constructor(@Optional() @SkipSelf() parentModule: CoreModule) {
    throwIfAlreadyLoaded(parentModule, 'CoreModule');
  }

  static forRoot(): ModuleWithProviders<CoreModule> {
    return {
      ngModule: CoreModule,
      providers: [...DEVUI_CORE_PROVIDERS],
    };
  }
}