[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 { 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 {}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue