Primeiro commit do projeto Angular
This commit is contained in:
Generated
Vendored
+14
@@ -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 {}
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
export { AppServerModule as default } from './app/app.module.server';
|
||||
Generated
Vendored
+15
@@ -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"
|
||||
]
|
||||
}
|
||||
Generated
Vendored
+11
@@ -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);
|
||||
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