mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-18 03:23:57 +08:00
This commit renames `provideServerRoutesConfig` to `provideServerRouting` and updates the second parameter to use the `ServerRoutes` features. This change improves alignment with the framework's API conventions and the way features are integrated. ### Example Usage: Before: ```typescript provideServerRoutesConfig(serverRoutes, { appShellRoute: 'shell' }) ``` After: ```typescript provideServerRouting(serverRoutes, withAppShell(AppShellComponent)) ```
14 lines
556 B
Plaintext
14 lines
556 B
Plaintext
import { NgModule } from '@angular/core';
|
|
import { ServerModule } from '@angular/platform-server';<% if(serverRouting) { %>
|
|
import { provideServerRouting } 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: [provideServerRouting(serverRoutes)],<% } %>
|
|
bootstrap: [AppComponent],
|
|
})
|
|
export class AppServerModule {}
|