-
-
-
Hello, {{ title() }}
-
Congratulations! Your app is running. 🎉
-
-
-
-
- @for (item of [
- { title: 'Explore the Docs', link: 'https://angular.dev' },
- { title: 'Learn with Tutorials', link: 'https://angular.dev/tutorials' },
- { title: 'Prompt and best practices for AI', link: 'https://angular.dev/ai/develop-with-ai'},
- { title: 'CLI Docs', link: 'https://angular.dev/tools/cli' },
- { title: 'Angular Language Service', link: 'https://angular.dev/tools/language-service' },
- { title: 'Angular DevTools', link: 'https://angular.dev/tools/devtools' },
- ]; track item.title) {
-
- {{ item.title }}
+
+
-
- }
-
-
+
Hello, {{ title() }}
+
Congratulations! Your app is running. 🎉
+
+
+
+
+ @for (
+ item of [
+ { title: 'Explore the Docs', link: 'https://angular.dev' },
+ { title: 'Learn with Tutorials', link: 'https://angular.dev/tutorials' },
+ {
+ title: 'Prompt and best practices for AI',
+ link: 'https://angular.dev/ai/develop-with-ai',
+ },
+ { title: 'CLI Docs', link: 'https://angular.dev/tools/cli' },
+ {
+ title: 'Angular Language Service',
+ link: 'https://angular.dev/tools/language-service',
+ },
+ { title: 'Angular DevTools', link: 'https://angular.dev/tools/devtools' },
+ ];
+ track item.title
+ ) {
+
+ {{ item.title }}
+
+
+ }
+
+
+
-
@@ -340,5 +357,4 @@
-
diff --git a/src/app/app.routes.server.ts b/src/app/app.routes.server.ts
index ffd37b1..a911aa8 100644
--- a/src/app/app.routes.server.ts
+++ b/src/app/app.routes.server.ts
@@ -1,8 +1,8 @@
import { RenderMode, ServerRoute } from '@angular/ssr';
export const serverRoutes: ServerRoute[] = [
- {
- path: '**',
- renderMode: RenderMode.Prerender
- }
+ {
+ path: '**',
+ renderMode: RenderMode.Prerender,
+ },
];
diff --git a/src/app/app.spec.ts b/src/app/app.spec.ts
index e8e550b..8c3a91b 100644
--- a/src/app/app.spec.ts
+++ b/src/app/app.spec.ts
@@ -2,23 +2,22 @@ import { TestBed } from '@angular/core/testing';
import { App } from './app';
describe('App', () => {
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- imports: [App],
- })
- .compileComponents();
- });
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ imports: [App],
+ }).compileComponents();
+ });
- it('should create the app', () => {
- const fixture = TestBed.createComponent(App);
- const app = fixture.componentInstance;
- expect(app).toBeTruthy();
- });
+ it('should create the app', () => {
+ const fixture = TestBed.createComponent(App);
+ const app = fixture.componentInstance;
+ expect(app).toBeTruthy();
+ });
- it('should render title', async () => {
- const fixture = TestBed.createComponent(App);
- await fixture.whenStable();
- const compiled = fixture.nativeElement as HTMLElement;
- expect(compiled.querySelector('h1')?.textContent).toContain('Hello, pchelpcrm');
- });
+ it('should render title', async () => {
+ const fixture = TestBed.createComponent(App);
+ await fixture.whenStable();
+ const compiled = fixture.nativeElement as HTMLElement;
+ expect(compiled.querySelector('h1')?.textContent).toContain('Hello, pchelpcrm');
+ });
});
diff --git a/src/app/app.ts b/src/app/app.ts
index 541b432..d248b7a 100644
--- a/src/app/app.ts
+++ b/src/app/app.ts
@@ -2,11 +2,11 @@ import { Component, signal } from '@angular/core';
import { RouterOutlet } from '@angular/router';
@Component({
- imports: [RouterOutlet],
- selector: 'app-root',
- styleUrl: './app.css',
- templateUrl: './app.html',
+ imports: [RouterOutlet],
+ selector: 'app-root',
+ styleUrl: './app.css',
+ templateUrl: './app.html',
})
export class App {
- protected readonly title = signal('pchelpcrm');
+ protected readonly title = signal('pchelpcrm');
}
diff --git a/src/index.html b/src/index.html
index 85b7b92..882aba3 100644
--- a/src/index.html
+++ b/src/index.html
@@ -1,13 +1,13 @@
-
-
-
Pchelpcrm
-
-
-
-
-
-
-
+
+
+
Pchelpcrm
+
+
+
+
+
+
+
diff --git a/src/main.server.ts b/src/main.server.ts
index 723e001..9b1aba7 100644
--- a/src/main.server.ts
+++ b/src/main.server.ts
@@ -2,7 +2,6 @@ import { BootstrapContext, bootstrapApplication } from '@angular/platform-browse
import { App } from './app/app';
import { config } from './app/app.config.server';
-const bootstrap = (context: BootstrapContext) =>
- bootstrapApplication(App, config, context);
+const bootstrap = (context: BootstrapContext) => bootstrapApplication(App, config, context);
export default bootstrap;
diff --git a/src/main.ts b/src/main.ts
index 5df75f9..190f341 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -2,5 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser';
import { appConfig } from './app/app.config';
import { App } from './app/app';
-bootstrapApplication(App, appConfig)
- .catch((err) => console.error(err));
+bootstrapApplication(App, appConfig).catch((err) => console.error(err));
diff --git a/src/server.ts b/src/server.ts
index 4bf0631..550d05d 100644
--- a/src/server.ts
+++ b/src/server.ts
@@ -1,8 +1,8 @@
import {
- AngularNodeAppEngine,
- createNodeRequestHandler,
- isMainModule,
- writeResponseToNodeResponse,
+ AngularNodeAppEngine,
+ createNodeRequestHandler,
+ isMainModule,
+ writeResponseToNodeResponse,
} from '@angular/ssr/node';
import express from 'express';
import { join } from 'node:path';
@@ -28,23 +28,21 @@ const angularApp = new AngularNodeAppEngine();
* Serve static files from /browser
*/
app.use(
- express.static(browserDistFolder, {
- maxAge: '1y',
- index: false,
- redirect: false,
- }),
+ express.static(browserDistFolder, {
+ maxAge: '1y',
+ index: false,
+ redirect: false,
+ }),
);
/**
* Handle all other requests by rendering the Angular application.
*/
app.use((req, res, next) => {
- angularApp
- .handle(req)
- .then((response) =>
- response ? writeResponseToNodeResponse(response, res) : next(),
- )
- .catch(next);
+ angularApp
+ .handle(req)
+ .then((response) => (response ? writeResponseToNodeResponse(response, res) : next()))
+ .catch(next);
});
/**
@@ -52,14 +50,14 @@ app.use((req, res, next) => {
* The server listens on the port defined by the `PORT` environment variable, or defaults to 4000.
*/
if (isMainModule(import.meta.url) || process.env['pm_id']) {
- const port = process.env['PORT'] || 4000;
- app.listen(port, (error) => {
- if (error) {
- throw error;
- }
+ const port = process.env['PORT'] || 4000;
+ app.listen(port, (error) => {
+ if (error) {
+ throw error;
+ }
- console.log(`Node Express server listening on http://localhost:${port}`);
- });
+ console.log(`Node Express server listening on http://localhost:${port}`);
+ });
}
/**
diff --git a/tsconfig.app.json b/tsconfig.app.json
index 11c10da..8d08449 100644
--- a/tsconfig.app.json
+++ b/tsconfig.app.json
@@ -1,16 +1,10 @@
/* 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": "./tsconfig.json",
- "compilerOptions": {
- "types": [
- "node"
- ]
- },
- "include": [
- "src/**/*.ts"
- ],
- "exclude": [
- "src/**/*.spec.ts"
- ]
+ "extends": "./tsconfig.json",
+ "compilerOptions": {
+ "types": ["node"]
+ },
+ "include": ["src/**/*.ts"],
+ "exclude": ["src/**/*.spec.ts"]
}
diff --git a/tsconfig.json b/tsconfig.json
index d2fbb9c..22182b3 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,31 +1,31 @@
/* 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. */
{
- "compileOnSave": false,
- "compilerOptions": {
- "noImplicitOverride": true,
- "noPropertyAccessFromIndexSignature": true,
- "noImplicitReturns": true,
- "noFallthroughCasesInSwitch": true,
- "skipLibCheck": true,
- "isolatedModules": true,
- "experimentalDecorators": true,
- "importHelpers": true,
- "target": "ES2022",
- "module": "preserve"
- },
- "angularCompilerOptions": {
- "enableI18nLegacyMessageIdFormat": false,
- "strictInjectionParameters": true,
- "strictInputAccessModifiers": true
- },
- "files": [],
- "references": [
- {
- "path": "./tsconfig.app.json"
+ "compileOnSave": false,
+ "compilerOptions": {
+ "noImplicitOverride": true,
+ "noPropertyAccessFromIndexSignature": true,
+ "noImplicitReturns": true,
+ "noFallthroughCasesInSwitch": true,
+ "skipLibCheck": true,
+ "isolatedModules": true,
+ "experimentalDecorators": true,
+ "importHelpers": true,
+ "target": "ES2022",
+ "module": "preserve"
},
- {
- "path": "./tsconfig.spec.json"
- }
- ]
+ "angularCompilerOptions": {
+ "enableI18nLegacyMessageIdFormat": false,
+ "strictInjectionParameters": true,
+ "strictInputAccessModifiers": true
+ },
+ "files": [],
+ "references": [
+ {
+ "path": "./tsconfig.app.json"
+ },
+ {
+ "path": "./tsconfig.spec.json"
+ }
+ ]
}
diff --git a/tsconfig.spec.json b/tsconfig.spec.json
index 9c8efb9..23d738d 100644
--- a/tsconfig.spec.json
+++ b/tsconfig.spec.json
@@ -1,14 +1,9 @@
/* 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": "./tsconfig.json",
- "compilerOptions": {
- "types": [
- "vitest/globals"
- ]
- },
- "include": [
- "src/**/*.d.ts",
- "src/**/*.spec.ts"
- ]
+ "extends": "./tsconfig.json",
+ "compilerOptions": {
+ "types": ["vitest/globals"]
+ },
+ "include": ["src/**/*.d.ts", "src/**/*.spec.ts"]
}