Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { AppModuleShared } from './app.module';
import { AppComponent } from './app.component';
import { ServerTransferStateModule } from '@angular/platform-server';
import { ServerPrebootModule } from 'preboot/server';
@NgModule({
bootstrap: [AppComponent],
imports: [
// Our Common AppModule
AppModuleShared,
ServerModule,
ServerPrebootModule.recordEvents({ appRoot: 'app-root' }),
NoopAnimationsModule,
// HttpTransferCacheModule still needs fixes for 5.0
// Leave this commented out for now, as it breaks Server-renders
// Looking into fixes for this! - @MarkPieszak
// ServerTransferStateModule // <-- broken for the time-being with ASP.NET
]
})
export class AppModule {
constructor() { }
}
import { NgModule } from '@angular/core';
import { ServerModule, ServerTransferStateModule } from '@angular/platform-server';
import { ServerPrebootModule } from 'preboot/server';
import { AppModule } from './app.module';
import { AppComponent } from './app.component';
@NgModule({
imports: [
AppModule, // 导入客户端根模块
ServerModule,
ServerPrebootModule.recordEvents({ appRoot: 'app-root' }),
ServerTransferStateModule
],
bootstrap: [AppComponent],
providers: []
})
export class AppServerModule {}