diff --git a/src/app/app.component.ts b/src/app/app.component.ts index f1ee96d..0a6607f 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,25 +1,21 @@ -import { Component, HostBinding, inject, OnInit, signal } from '@angular/core'; +import { Component, inject, OnInit, } from '@angular/core'; import { RouterOutlet } from '@angular/router'; -import { HeaderComponent } from './header/header.component'; -import { FooterComponent } from './footer/footer.component'; import { DarkModeService } from './services/dark-mode.service'; import { CommonModule } from '@angular/common'; import { KonamiService } from './services/konami.service'; -import { HealthService } from './health.service'; +import { HeaderComponent } from './header/header.component'; +import { FooterComponent } from './footer/footer.component'; @Component({ selector: 'app-root', - imports: [RouterOutlet, HeaderComponent, FooterComponent, CommonModule], + imports: [RouterOutlet, CommonModule, HeaderComponent, FooterComponent], + standalone: true, templateUrl: './app.component.html', styleUrl: './app.component.css' }) -export class AppComponent implements OnInit { +export class AppComponent{ darkModeService: DarkModeService = inject(DarkModeService); konamiService: KonamiService = inject(KonamiService); - healthService: HealthService = inject(HealthService); - ngOnInit() { - this.healthService.getHealth().subscribe(); - } } diff --git a/src/app/footer/footer.component.ts b/src/app/footer/footer.component.ts index e1717c8..32fa323 100644 --- a/src/app/footer/footer.component.ts +++ b/src/app/footer/footer.component.ts @@ -3,6 +3,7 @@ import { Component } from '@angular/core'; @Component({ selector: 'app-footer', imports: [], + standalone: true, templateUrl: './footer.component.html', styleUrl: './footer.component.css' }) diff --git a/src/app/header/header.component.ts b/src/app/header/header.component.ts index e278d7f..ad165e0 100644 --- a/src/app/header/header.component.ts +++ b/src/app/header/header.component.ts @@ -1,11 +1,11 @@ -import { NgIf } from '@angular/common'; -import { ChangeDetectionStrategy, Component, HostBinding, inject, OnInit, signal } from '@angular/core'; +import { ChangeDetectionStrategy, Component, inject, } from '@angular/core'; import { RouterModule } from '@angular/router'; import { DarkModeService } from '../services/dark-mode.service'; @Component({ selector: 'app-header', - imports: [RouterModule, NgIf], + imports: [RouterModule], + standalone: true, templateUrl: './header.component.html', styleUrl: './header.component.css', changeDetection: ChangeDetectionStrategy.OnPush diff --git a/src/app/health.service.spec.ts b/src/app/health.service.spec.ts deleted file mode 100644 index ec9349f..0000000 --- a/src/app/health.service.spec.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { TestBed } from '@angular/core/testing'; - -import { HealthService } from './health.service'; - -describe('HealthService', () => { - let service: HealthService; - - beforeEach(() => { - TestBed.configureTestingModule({}); - service = TestBed.inject(HealthService); - }); - - it('should be created', () => { - expect(service).toBeTruthy(); - }); -}); diff --git a/src/app/health.service.ts b/src/app/health.service.ts deleted file mode 100644 index 793f651..0000000 --- a/src/app/health.service.ts +++ /dev/null @@ -1,16 +0,0 @@ - import { Injectable } from '@angular/core'; - import { HttpClient } from '@angular/common/http'; - -@Injectable({ - providedIn: 'root' -}) -export class HealthService { - - constructor(private httpClient: HttpClient) { } - - getHealth() { - return this.httpClient.get('https://tracker-api.benhalverson.workers.dev/health'); - } - - -} diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts index 51fc335..c53db96 100644 --- a/src/app/home/home.component.ts +++ b/src/app/home/home.component.ts @@ -1,11 +1,10 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; -import { HeaderComponent } from '../header/header.component'; -import { FooterComponent } from '../footer/footer.component'; import { RouterModule } from '@angular/router'; @Component({ selector: 'app-home', - imports: [HeaderComponent, FooterComponent, RouterModule], + imports: [RouterModule], + standalone: true, templateUrl: './home.component.html', styleUrl: './home.component.css', changeDetection: ChangeDetectionStrategy.OnPush diff --git a/src/app/projects/projects.component.ts b/src/app/projects/projects.component.ts index 777744b..77d1579 100644 --- a/src/app/projects/projects.component.ts +++ b/src/app/projects/projects.component.ts @@ -2,11 +2,12 @@ import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; import { HeaderComponent } from '../header/header.component'; import { FooterComponent } from '../footer/footer.component'; import { ExperienceService } from '../experience.service'; -import { NgFor, NgOptimizedImage } from '@angular/common'; +import { NgFor, NgForOf, NgOptimizedImage } from '@angular/common'; @Component({ selector: 'app-projects', - imports: [HeaderComponent, FooterComponent, NgFor, NgOptimizedImage], + standalone: true, + imports: [NgOptimizedImage], templateUrl: './projects.component.html', styleUrl: './projects.component.css', changeDetection: ChangeDetectionStrategy.OnPush diff --git a/src/app/resume/resume.component.ts b/src/app/resume/resume.component.ts index 986ec58..6b8bb91 100644 --- a/src/app/resume/resume.component.ts +++ b/src/app/resume/resume.component.ts @@ -1,14 +1,13 @@ import { NgFor } from '@angular/common'; import { Component } from '@angular/core'; -import { FooterComponent } from '../footer/footer.component'; -import { HeaderComponent } from '../header/header.component'; import { ExperienceService } from '../experience.service'; @Component({ selector: 'app-resume', - imports: [HeaderComponent, FooterComponent, NgFor], templateUrl: './resume.component.html', - styleUrl: './resume.component.css' + styleUrl: './resume.component.css', + standalone: true, + imports: [NgFor] }) export class ResumeComponent {