We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f5691b commit d29f4bfCopy full SHA for d29f4bf
1 file changed
frontend/src/app/home/home.component.ts
@@ -1,27 +1,9 @@
1
-import { HttpClient } from "@angular/common/http";
2
-import { Component, OnInit } from "@angular/core";
3
-import { map } from "rxjs";
+import { Component } from "@angular/core";
4
5
@Component({
6
selector: "la-home",
7
templateUrl: "./home.component.html",
8
styleUrls: ["./home.component.scss"],
9
standalone: true,
10
})
11
-export class HomeComponent implements OnInit {
12
- public hooray?: string;
13
-
14
- constructor(private http: HttpClient) {}
15
16
- ngOnInit(): void {
17
- // This call is executed on the server and in the browser.
18
- this.http
19
- .get<{ message: string }[]>(`/api/example/`)
20
- .pipe(map((hoorays) => hoorays[0].message))
21
- .subscribe((hooray) => {
22
- if (!this.hooray) {
23
- this.hooray = hooray;
24
- }
25
- });
26
27
-}
+export class HomeComponent {}
0 commit comments