Skip to content

Commit e6eb221

Browse files
author
Jonas Gauffin
committed
fixed so that the tipsComponent has firstAppId
1 parent 1a22464 commit e6eb221

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
import { Component, OnInit } from '@angular/core';
2+
import { ApplicationService } from "../../applications/application.service";
23

34
@Component({
45
selector: 'app-tips',
56
templateUrl: './tips.component.html',
67
styleUrls: ['./tips.component.scss']
78
})
89
export class TipsComponent implements OnInit {
10+
firstApplicationId = 0;
911

10-
constructor() { }
12+
constructor(private appService: ApplicationService) { }
1113

1214
ngOnInit(): void {
15+
this.appService.list().then(apps => {
16+
if (apps.length > 0) {
17+
this.firstApplicationId = apps[0].id;
18+
}
19+
});
1320
}
1421

1522
}

0 commit comments

Comments
 (0)