- @for (transaction of transactions; track $index) {
+ @for (transaction of transactions(); track $index) {
}
+ @empty {
No transactions yet
}
diff --git a/client/src/app/screens/screen-profile/screen-profile.ts b/client/src/app/screens/screen-profile/screen-profile.ts
index c1ca96c..4483e3d 100644
--- a/client/src/app/screens/screen-profile/screen-profile.ts
+++ b/client/src/app/screens/screen-profile/screen-profile.ts
@@ -1,5 +1,5 @@
import { CommonModule, CurrencyPipe, DatePipe } from '@angular/common';
-import { Component, inject, OnInit } from '@angular/core';
+import { Component, inject, OnInit, signal } from '@angular/core';
import { APIService } from '../../services/api';
import Transaction from '@model/transaction';
import { Router } from '@angular/router';
@@ -14,7 +14,7 @@ export class ScreenProfile implements OnInit{
// TODO display real data
username = 'John Doe';
balance = 200;
- transactions!: Transaction[];
+ transactions = signal