app.module.ts 2.7 KB
Newer Older
范雪寒's avatar
范雪寒 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
import { BrowserModule } from '@angular/platform-browser';
import { NgModule, ErrorHandler } from '@angular/core';

import {MyErrorHandler} from './MyError';

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';
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';
jeff's avatar
jeff committed
20
import {CustomHotZoneComponent1} from './common/custom-hot-zone-mini/custom-hot-zone-mini.component';
范雪寒's avatar
范雪寒 committed
21 22 23 24 25 26 27
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';
import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontawesome';
import { fas } from '@fortawesome/free-solid-svg-icons';
import { far } from '@fortawesome/free-regular-svg-icons';
28
import { UploadDragonBoneComponent } from './common/upload-dragon-bone/upload-dragon-bone.component';
jeff's avatar
jeff committed
29
import { CustomActionComponent } from './common/custom-action/custom-action.component';
范雪寒's avatar
范雪寒 committed
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45

registerLocaleData(zh);

@NgModule({
  declarations: [
    AppComponent,
    FormComponent,
    PlayComponent,
    LessonTitleConfigComponent,
    AudioRecorderComponent,
    UploadImageWithPreviewComponent,
    BackgroundImagePipe,
    ResourcePipe,
    TimePipe,
    UploadVideoComponent,
    CustomHotZoneComponent,
jeff's avatar
jeff committed
46
    CustomHotZoneComponent1,
47
    UploadDragonBoneComponent,
jeff's avatar
jeff committed
48 49
    PlayerContentWrapperComponent,
    CustomActionComponent,
范雪寒's avatar
范雪寒 committed
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70

  ],
  imports: [
    BrowserModule,
    NgZorroAntdModule,
    FormsModule,
    HttpClientModule,
    BrowserAnimationsModule,
    FontAwesomeModule
  ],
  providers: [
    {provide: ErrorHandler, useClass: MyErrorHandler},
    { provide: NZ_I18N, useValue: zh_CN }
  ],
  bootstrap: [AppComponent]
})
export class AppModule {
  constructor(library: FaIconLibrary) {
    library.addIconPacks(fas, far);
  }
}