fuse-angular/src/app/app.module.ts

51 lines
1.5 KiB
TypeScript
Raw Normal View History

2021-04-15 14:13:46 +00:00
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 { 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';
const routerConfig: ExtraOptions = {
preloadingStrategy : PreloadAllModules,
scrollPositionRestoration: 'enabled'
2021-04-15 14:13:46 +00:00
};
@NgModule({
declarations: [
AppComponent
],
imports : [
BrowserModule,
BrowserAnimationsModule,
RouterModule.forRoot(appRoutes, routerConfig),
// Fuse, FuseConfig & FuseMockAPI
2021-04-15 14:13:46 +00:00
FuseModule,
FuseConfigModule.forRoot(appConfig),
FuseMockApiModule.forRoot(mockApiServices),
// Core module of your application
2021-04-15 14:13:46 +00:00
CoreModule,
// Layout module of your application
2021-04-15 14:13:46 +00:00
LayoutModule,
// 3rd party modules that require global configuration via forRoot
2021-04-15 14:13:46 +00:00
MarkdownModule.forRoot({})
],
bootstrap : [
AppComponent
]
})
export class AppModule
{
}