From ce39a11acee8f5ee67e0f2df6dfc6bd63cc7aae1 Mon Sep 17 00:00:00 2001 From: "Z. Charles Dziura" Date: Mon, 30 Jun 2025 20:15:54 -0400 Subject: [PATCH] Remove unnecessary code --- src/app/app.config.ts | 9 +- src/app/app.html | 341 ------------------------------------------ src/app/app.routes.ts | 3 - src/app/app.spec.ts | 25 ---- src/app/app.ts | 12 +- src/index.html | 2 +- src/main.ts | 3 +- tsconfig.spec.json | 14 -- 8 files changed, 7 insertions(+), 402 deletions(-) delete mode 100644 src/app/app.routes.ts delete mode 100644 src/app/app.spec.ts delete mode 100644 tsconfig.spec.json diff --git a/src/app/app.config.ts b/src/app/app.config.ts index 2e06ce8..0a09ddd 100644 --- a/src/app/app.config.ts +++ b/src/app/app.config.ts @@ -1,12 +1,5 @@ import { ApplicationConfig, provideBrowserGlobalErrorListeners, provideZonelessChangeDetection } from '@angular/core'; -import { provideRouter } from '@angular/router'; - -import { routes } from './app.routes'; export const appConfig: ApplicationConfig = { - providers: [ - provideBrowserGlobalErrorListeners(), - provideZonelessChangeDetection(), - provideRouter(routes) - ] + providers: [provideBrowserGlobalErrorListeners(), provideZonelessChangeDetection()], }; diff --git a/src/app/app.html b/src/app/app.html index cfb20b1..e69de29 100644 --- a/src/app/app.html +++ b/src/app/app.html @@ -1,341 +0,0 @@ - - - - - - - - - - - -
-
-
- -

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 }} - - - - - } -
- -
-
-
- - - - - - - - - - - diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts deleted file mode 100644 index dc39edb..0000000 --- a/src/app/app.routes.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { Routes } from '@angular/router'; - -export const routes: Routes = []; diff --git a/src/app/app.spec.ts b/src/app/app.spec.ts deleted file mode 100644 index eb30247..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, app'); - }); -}); diff --git a/src/app/app.ts b/src/app/app.ts index 9bb12a5..ad0b1b1 100644 --- a/src/app/app.ts +++ b/src/app/app.ts @@ -1,12 +1,8 @@ import { Component } from '@angular/core'; -import { RouterOutlet } from '@angular/router'; @Component({ - selector: 'app-root', - imports: [RouterOutlet], - templateUrl: './app.html', - styleUrl: './app.scss' + selector: 'app-root', + templateUrl: './app.html', + styleUrl: './app.scss', }) -export class App { - protected title = 'app'; -} +export class App {} diff --git a/src/index.html b/src/index.html index f8ef6ac..a836dce 100644 --- a/src/index.html +++ b/src/index.html @@ -2,7 +2,7 @@ - App + Math My Money diff --git a/src/main.ts b/src/main.ts index 5df75f9..7dbf136 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/tsconfig.spec.json b/tsconfig.spec.json deleted file mode 100644 index 04df34c..0000000 --- a/tsconfig.spec.json +++ /dev/null @@ -1,14 +0,0 @@ -/* 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": { - "outDir": "./out-tsc/spec", - "types": [ - "jasmine" - ] - }, - "include": [ - "src/**/*.ts" - ] -}