[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 { Component, OnInit } from '@angular/core';
import { HoodsService } from '../api/api/hoods.service';
@Component({ @Component({
selector: 'app-hoodspage', selector: 'app-hoodspage',
templateUrl: './hoodspage.component.html', templateUrl: './hoodspage.component.html',
styleUrls: ['./hoodspage.component.scss'] styleUrls: ['./hoodspage.component.scss'],
}) })
export class HoodspageComponent implements OnInit { export class HoodspageComponent implements OnInit {
hoods$ = this.hoodsService.getHoods();
constructor() { } constructor(private readonly hoodsService: HoodsService) {}
ngOnInit(): void {
}
ngOnInit(): void {}
} }