Add list of tasks

This commit is contained in:
2025-05-15 14:55:47 +02:00
parent b48d082edd
commit 0007f10ae3
10 changed files with 122 additions and 8 deletions

View File

@@ -0,0 +1,16 @@
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { Task } from '../models/task';
@Injectable({
providedIn: 'root'
})
export class TaskService {
private url = 'http://localhost:8080/api'
constructor(private http: HttpClient) {}
getTaskList(): Observable<Array<Task>> {
return this.http.get<Task[]>(`${this.url}/tasks`);
}
}