app.module.ts 2.53 KB
Newer Older
范雪寒's avatar
范雪寒 committed
1 2 3
import { BrowserModule } from '@angular/platform-browser';
import { NgModule, ErrorHandler } from '@angular/core';

Tt's avatar
Tt committed
4
import { MyErrorHandler } from './MyError';
范雪寒's avatar
范雪寒 committed
5 6 7 8 9 10 11 12

import { AppComponent } from './app.component';
import { NgZorroAntdModule, NZ_I18N, zh_CN } from 'ng-zorro-antd';
import { FormsModule } from '@angular/forms';
import { HttpClientModule } from '@angular/common/http';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { registerLocaleData } from '@angular/common';
import zh from '@angular/common/locales/zh';
Tt's avatar
Tt committed
13 14 15 16 17 18 19 20 21 22 23
import { FormComponent } from './form/form.component';
import { PlayComponent } from './play/play.component';
import { LessonTitleConfigComponent } from './common/lesson-title-config/lesson-title-config.component';
import { BackgroundImagePipe } from './pipes/background-image.pipe';
import { UploadImageWithPreviewComponent } from './common/upload-image-with-preview/upload-image-with-preview.component';
import { PlayerContentWrapperComponent } from './common/player-content-wrapper/player-content-wrapper.component';
import { CustomHotZoneComponent } from './common/custom-hot-zone/custom-hot-zone.component';
import { UploadVideoComponent } from './common/upload-video/upload-video.component';
import { TimePipe } from './pipes/time.pipe';
import { ResourcePipe } from './pipes/resource.pipe';
import { AudioRecorderComponent } from './common/audio-recorder/audio-recorder.component';
范雪寒's avatar
范雪寒 committed
24 25 26
import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontawesome';
import { fas } from '@fortawesome/free-solid-svg-icons';
import { far } from '@fortawesome/free-regular-svg-icons';
27
import { UploadDragonBoneComponent } from './common/upload-dragon-bone/upload-dragon-bone.component';
范雪寒's avatar
范雪寒 committed
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43

registerLocaleData(zh);

@NgModule({
  declarations: [
    AppComponent,
    FormComponent,
    PlayComponent,
    LessonTitleConfigComponent,
    AudioRecorderComponent,
    UploadImageWithPreviewComponent,
    BackgroundImagePipe,
    ResourcePipe,
    TimePipe,
    UploadVideoComponent,
    CustomHotZoneComponent,
44
    UploadDragonBoneComponent,
范雪寒's avatar
范雪寒 committed
45 46 47 48 49 50 51 52 53 54 55 56
    PlayerContentWrapperComponent

  ],
  imports: [
    BrowserModule,
    NgZorroAntdModule,
    FormsModule,
    HttpClientModule,
    BrowserAnimationsModule,
    FontAwesomeModule
  ],
  providers: [
Tt's avatar
Tt committed
57
    { provide: ErrorHandler, useClass: MyErrorHandler },
范雪寒's avatar
范雪寒 committed
58 59 60 61 62 63
    { provide: NZ_I18N, useValue: zh_CN }
  ],
  bootstrap: [AppComponent]
})
export class AppModule {
  constructor(library: FaIconLibrary) {
Tt's avatar
Tt committed
64 65 66
    let fs: any = fas;
    let fa: any = far;
    library.addIconPacks(fs, fa);
范雪寒's avatar
范雪寒 committed
67 68
  }
}