[frontend] Add minimal example for fetching hood list

This commit is contained in:
Cathy Hu 2020-08-17 16:09:07 +02:00
parent 5b1bbfa24e
commit c77d5fd25e
2 changed files with 6 additions and 6 deletions

View file

@ -1 +1 @@
<p>hoodspage works!</p>
<div *ngFor="let item of hoods$ | async">{{ item.name }}</div>

View file

@ -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 {}
}