From 62e484cfe4c33516a67db160ae88076037dcba07 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Thu, 18 Sep 2025 22:17:21 +0200 Subject: [PATCH] refactor: renamed `app` to `app.component` -- ALIGN --- src/app/app.component.spec.ts | 8 ++++---- src/app/app.component.ts | 6 +++--- src/main.ts | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts index 3a1a2969..4ee913b4 100644 --- a/src/app/app.component.spec.ts +++ b/src/app/app.component.spec.ts @@ -1,21 +1,21 @@ import { TestBed } from '@angular/core/testing'; -import { App } from './app'; +import { AppComponent } from './app.component'; describe('App', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [App], + imports: [AppComponent], }).compileComponents(); }); it('should create the app', () => { - const fixture = TestBed.createComponent(App); + const fixture = TestBed.createComponent(AppComponent); const app = fixture.componentInstance; expect(app).toBeTruthy(); }); it('should render title', () => { - const fixture = TestBed.createComponent(App); + const fixture = TestBed.createComponent(AppComponent); fixture.detectChanges(); const compiled = fixture.nativeElement as HTMLElement; expect(compiled.querySelector('h1')?.textContent).toContain('Hello, chatroom-frontend'); diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 2075482b..76763c28 100644 --- a/src/app/app.component.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.less' + templateUrl: './app.component.html', + styleUrl: './app.component.less' }) -export class App { +export class AppComponent { protected readonly title = signal('chatroom-frontend'); } diff --git a/src/main.ts b/src/main.ts index 5df75f9c..35b00f34 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 { AppComponent } from './app/app.component'; -bootstrapApplication(App, appConfig) +bootstrapApplication(AppComponent, appConfig) .catch((err) => console.error(err)); -- 2.39.5