beteran-backend-app-browser/src/app/app.module.ts
2022-08-13 20:15:48 +00:00

83 lines
3.1 KiB
TypeScript

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ExtraOptions, PreloadAllModules, RouterModule } from '@angular/router';
import { MatIconRegistry, MatIconModule } from '@angular/material/icon';
import { DomSanitizer } from '@angular/platform-browser';
import { MarkdownModule } from 'ngx-markdown';
import { FuseModule } from '@fuse';
import { FuseConfigModule } from '@fuse/services/config';
import { FuseMockApiModule } from '@fuse/lib/mock-api';
import { CoreModule } from 'app/core/core.module';
import { appConfig } from 'app/core/config/app.config';
import { mockApiServices } from 'app/mock-api';
import { LayoutModule } from 'app/layout/layout.module';
import { AppComponent } from 'app/app.component';
import { appRoutes } from 'app/app.routing';
import { NatsModule } from 'app/core/nats/nats.module';
import { WebStorageModule } from 'app/core/web-storage/web-storage.module';
import { environment } from 'environments/environment';
import { BankModule } from 'app/modules/polyglot/bank/bank.module';
import { IdentityModule } from 'app/modules/polyglot/identity/identity.module';
import { MemberBankAccountModule } from 'app/modules/polyglot/member_bank_account/member_bank_account.module';
import { MemberBankDepositModule } from 'app/modules/polyglot/member_bank_deposit/member_bank_deposit.module';
import { MemberBankWithdrawModule } from 'app/modules/polyglot/member_bank_withdraw/member_bank_withdraw.module';
import { MemberClassModule } from 'app/modules/polyglot/member_class/member_class.module';
import { MemberLevelModule } from 'app/modules/polyglot/member_level/member_level.module';
import { MemberModule } from 'app/modules/polyglot/member/member.module';
import { SiteModule } from 'app/modules/polyglot/site/site.module';
const routerConfig: ExtraOptions = {
preloadingStrategy: PreloadAllModules,
scrollPositionRestoration: 'enabled',
};
@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
BrowserAnimationsModule,
RouterModule.forRoot(appRoutes, routerConfig),
// Fuse, FuseConfig & FuseMockAPI
FuseModule,
FuseConfigModule.forRoot(appConfig),
FuseMockApiModule.forRoot(mockApiServices),
// Core module of your application
CoreModule,
// Layout module of your application
LayoutModule,
// 3rd party modules that require global configuration via forRoot
MarkdownModule.forRoot({}),
MatIconModule,
NatsModule.forRoot(environment.nats),
WebStorageModule.forRoot({}),
BankModule.forRoot(),
IdentityModule.forRoot(),
MemberBankAccountModule.forRoot(),
MemberBankDepositModule.forRoot(),
MemberBankWithdrawModule.forRoot(),
MemberClassModule.forRoot(),
MemberLevelModule.forRoot(),
MemberModule.forRoot(),
SiteModule.forRoot(),
],
bootstrap: [AppComponent],
})
export class AppModule {
constructor(matIconRegistry: MatIconRegistry, domSanitizer: DomSanitizer) {
matIconRegistry.addSvgIconSet(
domSanitizer.bypassSecurityTrustResourceUrl('./assets/mdi.svg')
);
}
}