We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71da24b commit 2a209efCopy full SHA for 2a209ef
table.component.ts
@@ -0,0 +1,24 @@
1
+// table.component.ts
2
+import { Component, OnInit } from '@angular/core';
3
+
4
+import { OrderTable } from './order-table.model';
5
+import { OrderService } from './order.service';
6
7
+@Component({
8
+ selector: 'app-order-table',
9
+ templateUrl: './order-table.component.html',
10
+ styleUrls: ['./order-table.component.css']
11
+})
12
+export class OrderTableComponent implements OnInit {
13
+ orderTable: OrderTable;
14
+ productHeader = 'Product';
15
+ headers: string[];
16
17
+ constructor(private orderService: OrderService) { }
18
19
+ ngOnInit() {
20
+ this.orderTable = this.orderService.getOrderTable();
21
+ this.headers = [this.productHeader].concat(this.orderTable.headers);
22
+ }
23
24
+}
0 commit comments