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

李维's avatar
李维 committed
4
import {MyErrorHandler} from './MyError';
5

李维's avatar
李维 committed
6 7 8 9 10
import { AppComponent } from './app.component';
import { NgZorroAntdModule, NZ_I18N, zh_CN } from 'ng-zorro-antd';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { HttpClientModule } from '@angular/common/http';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
liujiangnan's avatar
liujiangnan committed
11 12
import { registerLocaleData } from '@angular/common';
import zh from '@angular/common/locales/zh';
李维's avatar
李维 committed
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
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 {BackgroundUploadComponent} from './common/background-upload/background-upload.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';


liujiangnan's avatar
liujiangnan committed
30 31 32 33 34 35 36 37 38
registerLocaleData(zh);

@NgModule({
  declarations: [
    AppComponent,
    FormComponent,
    PlayComponent,
    LessonTitleConfigComponent,
    AudioRecorderComponent,
39
    UploadImageWithPreviewComponent,
李维's avatar
李维 committed
40
    BackgroundUploadComponent,
41
    BackgroundImagePipe,
limingzhe's avatar
limingzhe committed
42 43 44
    ResourcePipe,
    TimePipe,
    UploadVideoComponent,
limingzhe's avatar
limingzhe committed
45
    CustomHotZoneComponent,
李维's avatar
李维 committed
46 47
    PlayerContentWrapperComponent

liujiangnan's avatar
liujiangnan committed
48
  ],
49
  imports: [
李维's avatar
李维 committed
50 51
    BrowserModule,
    NgZorroAntdModule,
liujiangnan's avatar
liujiangnan committed
52 53 54
    FormsModule,
    HttpClientModule,
    BrowserAnimationsModule,
李维's avatar
李维 committed
55 56
    FontAwesomeModule,
    ReactiveFormsModule
liujiangnan's avatar
liujiangnan committed
57
  ],
李维's avatar
李维 committed
58 59
  providers: [
    {provide: ErrorHandler, useClass: MyErrorHandler},
liujiangnan's avatar
liujiangnan committed
60 61
    { provide: NZ_I18N, useValue: zh_CN }
  ],
liujiangnan's avatar
liujiangnan committed
62 63
  bootstrap: [AppComponent]
})
李维's avatar
李维 committed
64 65 66 67 68
export class AppModule {
  constructor(library: FaIconLibrary) {
    library.addIconPacks(fas, far);
  }
}