duck-booking-tool-front/app/dashboard.component.ts
Gergely Polonkai 3e02eb4abb Update for the final version of Angular2
It lost some functionality, but it was never put to use.
2016-10-28 05:19:23 +02:00

20 lines
484 B
TypeScript

import { Component, OnInit } from "@angular/core";
import { DuckService } from "./duck.service";
@Component({
selector: "dashboard",
templateUrl :"app/dashboard.component.html",
styleUrls: ["app/dashboard.component.css"]
})
export class DashboardComponent implements OnInit {
ducks: Duck[] = [];
constructor(private duckService: DuckService) {}
ngOnInit(): void {
this.duckService.getDucks()
.then(ducks => this.ducks = ducks);
}
}