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

@@ -1,4 +1,6 @@
import { Component } from '@angular/core';
import { Component, OnInit } from '@angular/core';
import { TaskService } from 'src/app/services/task.service';
import { Task } from 'src/app/models/task';
@Component({
selector: 'app-tasks',
@@ -6,8 +8,17 @@ import { Component } from '@angular/core';
styleUrls: ['tasks.page.scss'],
standalone: false,
})
export class TasksPage {
export class TasksPage implements OnInit {
public tasks: Array<Task> = [];
constructor() {}
constructor(
private taskService: TaskService
) {}
ngOnInit(): void {
this.taskService.getTaskList().subscribe(tasks => {
this.tasks = tasks;
});
}
}