Added API and first UI

This commit is contained in:
2017-02-26 21:08:38 +01:00
parent 23e47005cf
commit 373fdf8417
33 changed files with 784 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
import { Component, OnInit } from '@angular/core';
import { Beer } from './beer';
import { BeerService } from './beer.service';
@Component({
moduleId: module.id,
selector: 'my-dashboard',
templateUrl: './dashboard.component.html',
styleUrls: [ './dashboard.component.css' ]
})
export class DashboardComponent implements OnInit {
beers: Beer[] = [];
constructor(private beerService: BeerService) { }
ngOnInit(): void {
this.beerService
.getAll()
.subscribe(beers => this.beers = beers.slice(4, 8));
}
}