app.module.ts 2.87 KB
Newer Older
范雪寒's avatar
范雪寒 committed
1
import { BrowserModule } from '@angular/platform-browser';
limingzhe's avatar
limingzhe committed
2
import {DragDropModule} from '@angular/cdk/drag-drop';
范雪寒's avatar
范雪寒 committed
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
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';
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';
limingzhe's avatar
limingzhe committed
28
import { CustomActionComponent } from './common/custom-action/custom-action.component';
29
import { UploadDragonBoneComponent } from './common/upload-dragon-bone/upload-dragon-bone.component';
limingzhe's avatar
limingzhe committed
30 31
import { SubTemplateComponent } from './common/sub-template/sub-template.component';
import {FormulaInputComponent} from './common/formula-input/formula-input.component';
范雪寒's avatar
范雪寒 committed
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

registerLocaleData(zh);

@NgModule({
  declarations: [
    AppComponent,
    FormComponent,
    PlayComponent,
    LessonTitleConfigComponent,
    AudioRecorderComponent,
    UploadImageWithPreviewComponent,
    BackgroundImagePipe,
    ResourcePipe,
    TimePipe,
    UploadVideoComponent,
    CustomHotZoneComponent,
limingzhe's avatar
limingzhe committed
48
    SubTemplateComponent,
范雪寒's avatar
范雪寒 committed
49

limingzhe's avatar
limingzhe committed
50 51 52 53
    PlayerContentWrapperComponent,
    CustomActionComponent,
    UploadDragonBoneComponent,
    FormulaInputComponent,
范雪寒's avatar
范雪寒 committed
54 55 56 57 58 59 60
  ],
  imports: [
    BrowserModule,
    NgZorroAntdModule,
    FormsModule,
    HttpClientModule,
    BrowserAnimationsModule,
limingzhe's avatar
limingzhe committed
61 62
    FontAwesomeModule,
    DragDropModule
范雪寒's avatar
范雪寒 committed
63 64 65 66 67 68 69 70 71 72 73 74
  ],
  providers: [
    {provide: ErrorHandler, useClass: MyErrorHandler},
    { provide: NZ_I18N, useValue: zh_CN }
  ],
  bootstrap: [AppComponent]
})
export class AppModule {
  constructor(library: FaIconLibrary) {
    library.addIconPacks(fas, far);
  }
}