From 69d5f2553287836f49ff9d87c2a9519fda3e2b21 Mon Sep 17 00:00:00 2001 From: "YLHEALTH\\jackson.li" Date: Fri, 11 Jan 2019 14:28:41 +0800 Subject: [PATCH] add array pic successfully + p3 practice done --- src/app/home/dataList.const.ts | 26 +++++++++++++------------- src/app/home/home.component.html | 2 +- src/app/p3/imageUrl | 0 src/app/p3/p3.component.html | 10 ++-------- src/app/p3/p3.module.ts | 4 +++- 5 files changed, 19 insertions(+), 23 deletions(-) delete mode 100644 src/app/p3/imageUrl diff --git a/src/app/home/dataList.const.ts b/src/app/home/dataList.const.ts index c0ce317..95e3132 100644 --- a/src/app/home/dataList.const.ts +++ b/src/app/home/dataList.const.ts @@ -57,7 +57,7 @@ export const dataList = [ 'id': 800, 'main': 'Clear', 'description': 'sky is clear', - 'icon': '01d' + 'icon': '../../assets/01d.png' } ], 'speed': 1.92, @@ -81,7 +81,7 @@ export const dataList = [ 'id': 800, 'main': 'Clear', 'description': 'sky is clear', - 'icon': '01d' + 'icon': '../../assets/01d.png' } ], 'speed': 2.3, @@ -105,7 +105,7 @@ export const dataList = [ 'id': 500, 'main': 'Rain', 'description': 'light rain', - 'icon': '10d' + 'icon': '../../assets/10d.png' } ], 'speed': 3.21, @@ -130,7 +130,7 @@ export const dataList = [ 'id': 500, 'main': 'Rain', 'description': 'light rain', - 'icon': '10d' + 'icon': '../../assets/10d.png' } ], 'speed': 3.75, @@ -154,7 +154,7 @@ export const dataList = [ 'id': 800, 'main': 'Clear', 'description': 'sky is clear', - 'icon': '01d' + 'icon': '../../assets/01d.png' } ], 'speed': 1.98, @@ -178,7 +178,7 @@ export const dataList = [ 'id': 800, 'main': 'Clear', 'description': 'sky is clear', - 'icon': '01d' + 'icon': '../../assets/01d.png' } ], 'speed': 3.14, @@ -202,7 +202,7 @@ export const dataList = [ 'id': 500, 'main': 'Rain', 'description': 'light rain', - 'icon': '10d' + 'icon': '../../assets/10d.png' } ], 'speed': 6.9, @@ -227,7 +227,7 @@ export const dataList = [ 'id': 800, 'main': 'Clear', 'description': 'sky is clear', - 'icon': '01d' + 'icon': '../../assets/01d.png' } ], 'speed': 6.71, @@ -251,7 +251,7 @@ export const dataList = [ 'id': 500, 'main': 'Rain', 'description': 'light rain', - 'icon': '10d' + 'icon': '../../assets/10d.png' } ], 'speed': 6.22, @@ -276,7 +276,7 @@ export const dataList = [ 'id': 500, 'main': 'Rain', 'description': 'light rain', - 'icon': '10d' + 'icon': '../../assets/10d.png' } ], 'speed': 7.32, @@ -301,7 +301,7 @@ export const dataList = [ 'id': 501, 'main': 'Rain', 'description': 'moderate rain', - 'icon': '10d' + 'icon': '../../assets/10d.png' } ], 'speed': 5.19, @@ -326,7 +326,7 @@ export const dataList = [ 'id': 500, 'main': 'Rain', 'description': 'light rain', - 'icon': '10d' + 'icon': '../../assets/10d.png' } ], 'speed': 8.15, @@ -351,7 +351,7 @@ export const dataList = [ 'id': 500, 'main': 'Rain', 'description': 'light rain', - 'icon': '10d' + 'icon': '../../assets/10d.png' } ], 'speed': 3.5, diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html index 600bda3..8eb6bfd 100644 --- a/src/app/home/home.component.html +++ b/src/app/home/home.component.html @@ -94,7 +94,7 @@ cnt:
{{ item2.description }} - {{ item2.icon }} + {{ item.speed }} meter/sec diff --git a/src/app/p3/imageUrl b/src/app/p3/imageUrl deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/p3/p3.component.html b/src/app/p3/p3.component.html index f66e4f5..ecf0629 100644 --- a/src/app/p3/p3.component.html +++ b/src/app/p3/p3.component.html @@ -1,18 +1,12 @@

題三

- - -

作業連結

(目前在stackblitz能做出來,但用自己的電腦卻bulid不起來,無法display):
- -Stackblitz - - +

diff --git a/src/app/p3/p3.module.ts b/src/app/p3/p3.module.ts index e88418e..8126919 100644 --- a/src/app/p3/p3.module.ts +++ b/src/app/p3/p3.module.ts @@ -1,5 +1,6 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; import { P3RoutingModule } from './p3-routing.module'; import { P3Component } from './p3.component'; @@ -8,7 +9,8 @@ import { P3Component } from './p3.component'; declarations: [P3Component], imports: [ CommonModule, - P3RoutingModule + P3RoutingModule, + FormsModule ] }) export class P3Module { } -- 2.26.2