From 9bb792f233790dc99452f002bb1dfb37806df026 Mon Sep 17 00:00:00 2001 From: "DESKTOP-P9VU163\\admin" Date: Tue, 17 Jun 2025 15:22:47 +0300 Subject: [PATCH] new commit 2 --- src/app/app.component.html | 336 +++++++++++++++++++++++++++ src/app/{app.ts => app.component.ts} | 6 +- src/app/app.spec.ts | 25 -- src/main.ts | 2 +- 4 files changed, 340 insertions(+), 29 deletions(-) create mode 100644 src/app/app.component.html rename src/app/{app.ts => app.component.ts} (74%) delete mode 100644 src/app/app.spec.ts diff --git a/src/app/app.component.html b/src/app/app.component.html new file mode 100644 index 0000000..36093e1 --- /dev/null +++ b/src/app/app.component.html @@ -0,0 +1,336 @@ + + + + + + + + + + + +
+
+
+ +

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: '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 }} + + + + + } +
+ +
+
+
+ + + + + + + + + + + diff --git a/src/app/app.ts b/src/app/app.component.ts similarity index 74% rename from src/app/app.ts rename to src/app/app.component.ts index 19c119c..858b176 100644 --- a/src/app/app.ts +++ b/src/app/app.component.ts @@ -4,9 +4,9 @@ import { RouterOutlet } from '@angular/router'; @Component({ selector: 'app-root', imports: [RouterOutlet], - templateUrl: './app.html', - styleUrl: './app.scss' + templateUrl: './app.component.html', + styleUrl: './app.component.scss' }) export class App { protected title = 'angular-tour-of-heroes'; -} +} \ No newline at end of file diff --git a/src/app/app.spec.ts b/src/app/app.spec.ts deleted file mode 100644 index 3a5739e..0000000 --- a/src/app/app.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { provideZonelessChangeDetection } from '@angular/core'; -import { TestBed } from '@angular/core/testing'; -import { App } from './app'; - -describe('App', () => { - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [App], - providers: [provideZonelessChangeDetection()] - }).compileComponents(); - }); - - it('should create the app', () => { - const fixture = TestBed.createComponent(App); - const app = fixture.componentInstance; - expect(app).toBeTruthy(); - }); - - it('should render title', () => { - const fixture = TestBed.createComponent(App); - fixture.detectChanges(); - const compiled = fixture.nativeElement as HTMLElement; - expect(compiled.querySelector('h1')?.textContent).toContain('Hello, angular-tour-of-heroes'); - }); -}); diff --git a/src/main.ts b/src/main.ts index 5df75f9..bbac77a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,6 @@ import { bootstrapApplication } from '@angular/platform-browser'; import { appConfig } from './app/app.config'; -import { App } from './app/app'; +import { App } from './app/app.component'; bootstrapApplication(App, appConfig) .catch((err) => console.error(err));