[frontend] Add minimal example for fetching hood list
This commit is contained in:
parent
5b1bbfa24e
commit
c77d5fd25e
|
@ -1 +1 @@
|
|||
<p>hoodspage works!</p>
|
||||
<div *ngFor="let item of hoods$ | async">{{ item.name }}</div>
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { HoodsService } from '../api/api/hoods.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-hoodspage',
|
||||
templateUrl: './hoodspage.component.html',
|
||||
styleUrls: ['./hoodspage.component.scss']
|
||||
styleUrls: ['./hoodspage.component.scss'],
|
||||
})
|
||||
export class HoodspageComponent implements OnInit {
|
||||
hoods$ = this.hoodsService.getHoods();
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
constructor(private readonly hoodsService: HoodsService) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue