From c2111b49786db6cb3b4c65ff6440ae7c633fe2ad Mon Sep 17 00:00:00 2001 From: "YLHEALTH\\jackson.li" Date: Fri, 11 Jan 2019 17:30:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=B7=B4=E7=BF=92=E4=BA=94?= =?UTF-8?q?=E9=A0=81=E9=9D=A2=20=E7=B7=B4=E7=BF=92=E5=9B=9B=E7=9A=84if=20e?= =?UTF-8?q?lse=E5=8D=A1=E9=97=9C=EF=BC=88=E7=B7=B4=E7=BF=92=E4=B8=80?= =?UTF-8?q?=E4=BA=8C=E4=B8=89=E5=A4=A7=E8=87=B4=E5=AE=8C=E6=88=90=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/app-path.const.ts | 3 ++- src/app/app-routing.module.ts | 4 ++++ src/app/app.component.html | 1 + src/app/app.module.ts | 1 + src/app/p4/p4.component.html | 2 +- src/app/p4/p4.component.ts | 2 +- src/app/p5/p5-routing.module.ts | 16 ++++++++++++++++ src/app/p5/p5.component.css | 0 src/app/p5/p5.component.html | 25 +++++++++++++++++++++++++ src/app/p5/p5.component.ts | 15 +++++++++++++++ src/app/p5/p5.module.ts | 16 ++++++++++++++++ 11 files changed, 82 insertions(+), 3 deletions(-) create mode 100644 src/app/p5/p5-routing.module.ts create mode 100644 src/app/p5/p5.component.css create mode 100644 src/app/p5/p5.component.html create mode 100644 src/app/p5/p5.component.ts create mode 100644 src/app/p5/p5.module.ts diff --git a/src/app/app-path.const.ts b/src/app/app-path.const.ts index d2f6e5f..af7867f 100644 --- a/src/app/app-path.const.ts +++ b/src/app/app-path.const.ts @@ -6,6 +6,7 @@ export const appPath = { p3: 'p3', - p4: 'p4' + p4: 'p4', + p5: 'p5' }; diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index d22388f..55a3181 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -18,6 +18,10 @@ const routes: Routes = [ { path: appPath.p4, loadChildren: './p4/p4.module#P4Module' + }, + { + path: appPath.p5, + loadChildren: './p5/p5.module#P5Module' } ]; diff --git a/src/app/app.component.html b/src/app/app.component.html index 3e5b28e..7aa3ae5 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -5,6 +5,7 @@
  • 練習二
  • 練習三
  • 練習四
  • +
  • 練習五(進階版)
  • diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 9db90f0..3f4722d 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -4,6 +4,7 @@ import { NgModule } from '@angular/core'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; + @NgModule({ declarations: [ AppComponent, diff --git a/src/app/p4/p4.component.html b/src/app/p4/p4.component.html index 3bd535b..c2bb696 100644 --- a/src/app/p4/p4.component.html +++ b/src/app/p4/p4.component.html @@ -19,5 +19,5 @@ 欄位三 :

    + (keyup.enter)="addNumber3($event.target)">

    diff --git a/src/app/p4/p4.component.ts b/src/app/p4/p4.component.ts index a1ff63b..fb45881 100644 --- a/src/app/p4/p4.component.ts +++ b/src/app/p4/p4.component.ts @@ -14,7 +14,7 @@ export class P4Component implements OnInit { console.log(inputRef.value); inputRef.value = ''; - this.value2 = new Number(inputRef.value); + this.value2 = +inputRef.value; if ( this.value2 > 0 diff --git a/src/app/p5/p5-routing.module.ts b/src/app/p5/p5-routing.module.ts new file mode 100644 index 0000000..b61fcc5 --- /dev/null +++ b/src/app/p5/p5-routing.module.ts @@ -0,0 +1,16 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; +import { P5Component } from './p5.component'; + +const routes: Routes = [ + { + path: '', + component: P5Component + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class P5RoutingModule { } diff --git a/src/app/p5/p5.component.css b/src/app/p5/p5.component.css new file mode 100644 index 0000000..e69de29 diff --git a/src/app/p5/p5.component.html b/src/app/p5/p5.component.html new file mode 100644 index 0000000..402bf81 --- /dev/null +++ b/src/app/p5/p5.component.html @@ -0,0 +1,25 @@ + + + 動物照片 +
    +
    + + + + + + + + +
    動物info +
    A_Name_Ch(中文名)、A_Diet(食性)、A_Family 分類學_科)、A_Crisis(面臨問題)、A_Summary(摘要說明)、A_Theme_Name(主題網頁)、A_Theme_URL(主題網頁URL)
    個人資料
    + 姓名:
    + 性別:
    + 手機電話(4-3-3):
    + 生日(YYYY/MM/DD):
    + 目前年收入(XXX,XXX):
    + +
    + +

    + diff --git a/src/app/p5/p5.component.ts b/src/app/p5/p5.component.ts new file mode 100644 index 0000000..b137c55 --- /dev/null +++ b/src/app/p5/p5.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-p5', + templateUrl: './p5.component.html', + styleUrls: ['./p5.component.css'] +}) +export class P5Component implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/p5/p5.module.ts b/src/app/p5/p5.module.ts new file mode 100644 index 0000000..53da828 --- /dev/null +++ b/src/app/p5/p5.module.ts @@ -0,0 +1,16 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; + +import { P5RoutingModule } from './p5-routing.module'; +import { P5Component } from './p5.component'; + +@NgModule({ + declarations: [P5Component], + imports: [ + CommonModule, + P5RoutingModule, + FormsModule + ] +}) +export class P5Module { } -- 2.26.2