From 8a6c4e1603b19480daac076b9a9412db7acbae61 Mon Sep 17 00:00:00 2001 From: Phan Huy Tran Date: Wed, 5 Feb 2025 10:51:13 +0100 Subject: [PATCH] Clean up --- frontend/src/app/Hello.ts | 6 ---- frontend/src/app/app.component.html | 2 -- frontend/src/app/app.routes.ts | 5 +-- .../app/hello-list/hello-list.component.css | 0 .../app/hello-list/hello-list.component.html | 8 ----- .../app/hello-list/hello-list.component.ts | 31 ------------------- 6 files changed, 1 insertion(+), 51 deletions(-) delete mode 100644 frontend/src/app/Hello.ts delete mode 100644 frontend/src/app/hello-list/hello-list.component.css delete mode 100644 frontend/src/app/hello-list/hello-list.component.html delete mode 100644 frontend/src/app/hello-list/hello-list.component.ts diff --git a/frontend/src/app/Hello.ts b/frontend/src/app/Hello.ts deleted file mode 100644 index 36f3f8a..0000000 --- a/frontend/src/app/Hello.ts +++ /dev/null @@ -1,6 +0,0 @@ -export class Hello { - constructor(public id?: number, - public message?: string, - ) { - } -} diff --git a/frontend/src/app/app.component.html b/frontend/src/app/app.component.html index 1446b21..69ff63a 100644 --- a/frontend/src/app/app.component.html +++ b/frontend/src/app/app.component.html @@ -1,7 +1,5 @@

LF12 Starter

-hello - diff --git a/frontend/src/app/app.routes.ts b/frontend/src/app/app.routes.ts index b6b3885..02cdecf 100644 --- a/frontend/src/app/app.routes.ts +++ b/frontend/src/app/app.routes.ts @@ -1,7 +1,4 @@ -import { Routes } from '@angular/router'; -import {HelloListComponent} from "./hello-list/hello-list.component"; -import {authGuard} from "./auth.guard"; +import {Routes} from '@angular/router'; export const routes: Routes = [ - { path: 'hello', component: HelloListComponent , canActivate: [authGuard] } ]; diff --git a/frontend/src/app/hello-list/hello-list.component.css b/frontend/src/app/hello-list/hello-list.component.css deleted file mode 100644 index e69de29..0000000 diff --git a/frontend/src/app/hello-list/hello-list.component.html b/frontend/src/app/hello-list/hello-list.component.html deleted file mode 100644 index 3033433..0000000 --- a/frontend/src/app/hello-list/hello-list.component.html +++ /dev/null @@ -1,8 +0,0 @@ -

List of Hellos

- diff --git a/frontend/src/app/hello-list/hello-list.component.ts b/frontend/src/app/hello-list/hello-list.component.ts deleted file mode 100644 index f16c476..0000000 --- a/frontend/src/app/hello-list/hello-list.component.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Component } from '@angular/core'; -import {Observable, of} from "rxjs"; -import {Hello} from "../Hello"; -import {HttpClient, HttpClientModule, HttpHeaders, provideHttpClient} from "@angular/common/http"; -import {AsyncPipe} from "@angular/common"; -import {KeycloakService} from "keycloak-angular"; - -@Component({ - selector: 'app-hello-list', - standalone: true, - imports: [ - AsyncPipe - ], - providers: [KeycloakService], - templateUrl: './hello-list.component.html', - styleUrl: './hello-list.component.css' -}) -export class HelloListComponent { - employees$: Observable; - - constructor(private http: HttpClient) { - this.employees$ = of([]); - this.fetchData(); - } - - fetchData() { - this.employees$ = this.http.get('/backend/hellos'); - } - - -}