This commit is contained in:
CHEVALLIER Abel
2025-11-13 16:23:22 +01:00
parent de9c515a47
commit cb235644dc
34924 changed files with 3811102 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
import { NgModule } from '@angular/core';
import { provideServerRendering, withRoutes } from '@angular/ssr';
import { <%= appComponentName %> } from '<%= appComponentPath %>';
import { <%= appModuleName %> } from '<%= appModulePath %>';
import { serverRoutes } from './app.routes.server';
@NgModule({
imports: [<%= appModuleName %>],
providers: [provideServerRendering(withRoutes(serverRoutes))],
bootstrap: [<%= appComponentName %>],
})
export class AppServerModule {}

View File

@@ -0,0 +1,8 @@
import { RenderMode, ServerRoute } from '@angular/ssr';
export const serverRoutes: ServerRoute[] = [
{
path: '**',
renderMode: RenderMode.Prerender
}
];

View File

@@ -0,0 +1 @@
export { AppServerModule as default } from './app/app.module.server';

View File

@@ -0,0 +1,12 @@
import { mergeApplicationConfig, ApplicationConfig } from '@angular/core';
import { provideServerRendering, withRoutes } from '@angular/ssr';
import { appConfig } from './app.config';
import { serverRoutes } from './app.routes.server';
const serverConfig: ApplicationConfig = {
providers: [
provideServerRendering(withRoutes(serverRoutes))
]
};
export const config = mergeApplicationConfig(appConfig, serverConfig);

View File

@@ -0,0 +1,8 @@
import { RenderMode, ServerRoute } from '@angular/ssr';
export const serverRoutes: ServerRoute[] = [
{
path: '**',
renderMode: RenderMode.Prerender
}
];

View File

@@ -0,0 +1,8 @@
import { BootstrapContext, bootstrapApplication } from '@angular/platform-browser';
import { <%= appComponentName %> } from '<%= appComponentPath %>';
import { config } from './app/app.config.server';
const bootstrap = (context: BootstrapContext) =>
bootstrapApplication(<%= appComponentName %>, config, context);
export default bootstrap;

View File

@@ -0,0 +1,14 @@
import { NgModule } from '@angular/core';
import { ServerModule } from '@angular/platform-server';
import { <%= appModuleName %> } from '<%= appModulePath %>';
import { <%= appComponentName %> } from '<%= appComponentPath %>';
@NgModule({
imports: [
<%= appModuleName %>,
ServerModule,
],
bootstrap: [<%= appComponentName %>],
})
export class AppServerModule {}

View File

@@ -0,0 +1 @@
export { AppServerModule as default } from './app/app.module.server';

View File

@@ -0,0 +1,15 @@
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
{
"extends": "./<%= tsConfigExtends %>",
"compilerOptions": {
"outDir": "<%= relativePathToWorkspaceRoot %>/out-tsc/server",
"types": [
"node"<% if (hasLocalizePackage) { %>,
"@angular/localize"<% } %>
]
},
"files": [
"src/main.server.ts"
]
}

View File

@@ -0,0 +1,11 @@
import { mergeApplicationConfig, ApplicationConfig } from '@angular/core';
import { provideServerRendering } from '@angular/ssr';
import { appConfig } from './app.config';
const serverConfig: ApplicationConfig = {
providers: [
provideServerRendering()
]
};
export const config = mergeApplicationConfig(appConfig, serverConfig);

View File

@@ -0,0 +1,8 @@
import { BootstrapContext, bootstrapApplication } from '@angular/platform-browser';
import { <%= appComponentName %> } from '<%= appComponentPath %>';
import { config } from './app/app.config.server';
const bootstrap = (context: BootstrapContext) =>
bootstrapApplication(<%= appComponentName %>, config, context);
export default bootstrap;