From 9288f126c4da81ddd2ca400844fbeb8ee66d0e17 Mon Sep 17 00:00:00 2001
From: "YLHEALTH\\jackson.li" 7|vxbgSHBgUGyR6Xk43Ur;Zkfm1Nmyr^n&+Elg&bN
關於這一題我看了很多網站但還是解決不出來,我分別在iT邦幫忙和stackOverflow提問
- stackoverflow
-
iT邦幫忙
-
,照著他們的解答我依舊無法解決問題十分抱歉
-
我認為問題點在於我無法將associative array插進第二個table裡面(第一個table可以),我嘗試過使用
-*ngFor *ngif並用、
-ng-container
但依舊無法,請bass姐賜教
-
icon | - +|||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{ item2.description }} | -- {{item }} + | + {{ pic }} |
{{ item.speed }} meter/sec
diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts
index 0d2deb4..1c22205 100644
--- a/src/app/home/home.component.ts
+++ b/src/app/home/home.component.ts
@@ -1,7 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { dataList } from './dataList.const';
-
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
@@ -11,6 +10,7 @@ export class HomeComponent implements OnInit {
list = dataList;
+ pic = Image['./01d.png'];
constructor() { }
diff --git a/src/app/p2/data.ts b/src/app/p2/data.ts
index c79e1d9..d211b90 100644
--- a/src/app/p2/data.ts
+++ b/src/app/p2/data.ts
@@ -3,14 +3,14 @@ export class Data {
name: string;
price: any;
quantity: any;
-
+ total: any;
constructor(name: string, price: any, quantity: any) {
this.name = name;
this.price = price;
this.quantity = quantity;
-
+ this.total = price * quantity;
}
diff --git a/src/app/p2/p2.component.html b/src/app/p2/p2.component.html
index dea6fe5..6d940f9 100644
--- a/src/app/p2/p2.component.html
+++ b/src/app/p2/p2.component.html
@@ -1,15 +1,20 @@
題二 -尚未將隱藏及加總功能也還沒 +尚餘隱藏功能 +
|