mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-18 11:44:05 +08:00
This commit updates several schematics to make the new `@angular/ssr` feature opt-in. Users can opt in by using the `--server-routing` option or by responding with `yes` to the prompt.
14 lines
566 B
Plaintext
14 lines
566 B
Plaintext
import { NgModule } from '@angular/core';
|
|
import { ServerModule } from '@angular/platform-server';<% if(serverRouting) { %>
|
|
import { provideServerRoutesConfig } from '@angular/ssr';<% } %>
|
|
import { AppComponent } from './app.component';
|
|
import { AppModule } from './app.module';<% if(serverRouting) { %>
|
|
import { serverRoutes } from './app.routes.server';<% } %>
|
|
|
|
@NgModule({
|
|
imports: [AppModule, ServerModule],<% if(serverRouting) { %>
|
|
providers: [provideServerRoutesConfig(serverRoutes)],<% } %>
|
|
bootstrap: [AppComponent],
|
|
})
|
|
export class AppServerModule {}
|