1
|
import {NgModule} from '@angular/core';
|
2
|
import {ServerModule, ServerTransferStateModule} from '@angular/platform-server';
|
3
|
import {ModuleMapLoaderModule} from '@nguniversal/module-map-ngfactory-loader';
|
4
|
|
5
|
import {AppModule} from './app.module';
|
6
|
import {AppComponent} from './app.component';
|
7
|
//import {REQUEST} from "@nguniversal/express-engine/tokens";
|
8
|
|
9
|
@NgModule({
|
10
|
imports: [
|
11
|
// The AppServerModule should import your AppModule followed
|
12
|
// by the ServerModule from @angular/platform-server.
|
13
|
AppModule,
|
14
|
ServerModule,
|
15
|
ModuleMapLoaderModule,
|
16
|
ServerTransferStateModule
|
17
|
],
|
18
|
// Since the bootstrapped component is not inherited from your
|
19
|
// imported AppModule, it needs to be repeated here.
|
20
|
bootstrap: [AppComponent],
|
21
|
})
|
22
|
export class AppServerModule {
|
23
|
/*constructor(@Inject(REQUEST) private request: Request) {}*/
|
24
|
}
|