Primeiro commit do projeto Angular
This commit is contained in:
Generated
Vendored
+12
@@ -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 {}
|
||||
Generated
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
import { RenderMode, ServerRoute } from '@angular/ssr';
|
||||
|
||||
export const serverRoutes: ServerRoute[] = [
|
||||
{
|
||||
path: '**',
|
||||
renderMode: RenderMode.Prerender
|
||||
}
|
||||
];
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
export { AppServerModule as default } from './app/app.module.server';
|
||||
Generated
Vendored
+12
@@ -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);
|
||||
Generated
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
import { RenderMode, ServerRoute } from '@angular/ssr';
|
||||
|
||||
export const serverRoutes: ServerRoute[] = [
|
||||
{
|
||||
path: '**',
|
||||
renderMode: RenderMode.Prerender
|
||||
}
|
||||
];
|
||||
Generated
Vendored
+8
@@ -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;
|
||||
Reference in New Issue
Block a user