From fbf3a726fea86bff599adf27358d8c419116467d Mon Sep 17 00:00:00 2001 From: yanggb Date: Sat, 25 Feb 2017 21:47:16 +0800 Subject: [PATCH] =?UTF-8?q?#1=20=E8=A7=A3=E5=86=B3=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E4=B8=8E=E5=B1=95=E7=A4=BA=E6=95=B0=E6=8D=AE=E7=9A=84=E8=83=BD?= =?UTF-8?q?=E5=8A=9B=20=20https://github.com/muyuqiu001/displayData/issues?= =?UTF-8?q?/1#issuecomment-282334211?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/app.component.html | 39 ++++++++++++++++++++++ app/app.component.ts | 74 +++++++++++++++--------------------------- app/app.module.ts | 15 +++++---- 3 files changed, 74 insertions(+), 54 deletions(-) create mode 100644 app/app.component.html diff --git a/app/app.component.html b/app/app.component.html new file mode 100644 index 0000000..f17a5e9 --- /dev/null +++ b/app/app.component.html @@ -0,0 +1,39 @@ +

{{title}}

+
+ + + + + + + + + + + + + + + +
+ Commit Id + + Reivew Person + + Review Time + + Reivew File + + Commit Person +
+ {{data.id}} + + {{data.reviewer}} + + {{data.reviewtime}} + + {{data.file}} + + {{data.committer}} +
+
\ No newline at end of file diff --git a/app/app.component.ts b/app/app.component.ts index 295d8bd..ff30972 100644 --- a/app/app.component.ts +++ b/app/app.component.ts @@ -2,59 +2,37 @@ import { Component } from '@angular/core'; import { ReviewData } from './reviewdata'; +const DATAS: ReviewData[] = [ + { + id: "zkasdf1", + reviewer: "00316496", + reviewtime: "201702242200", + file: "12.txt", + committer: "00388224", + }, + { + id: "zkasdf12", + reviewer: "00316496", + reviewtime: "201702232200", + file: "123.txt", + committer: "00388224", + }, + { + id: "zkasdf123", + reviewer: "00316496", + reviewtime: "201702235200", + file: "1234.txt", + committer: "00388224", + }, +]; + @Component({ moduleId: module.id, selector: 'my-app', - template: ` -

{{title}}

-
- - - - - - - - - - - - - - - -
- Commit Id - - Reivew Person - - Review Time - - Reivew File - - Commit Person -
- {{data.id}} - - {{data.reviewer}} - - {{data.reviewtime}} - - {{data.file}} - - {{data.committer}} -
-
- `, + templateUrl:'app.component.html', }) export class AppComponent { title = 'The committed details of This Project'; - data: ReviewData = { - id: "zkasdf1234", - reviewer: "00316496", - reviewtime: "201702242200", - file: "123.txt", - committer: "00388224", - }; + datas = DATAS; } diff --git a/app/app.module.ts b/app/app.module.ts index 357b003..ad49fd8 100644 --- a/app/app.module.ts +++ b/app/app.module.ts @@ -1,11 +1,14 @@ -import { NgModule } from '@angular/core'; +import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; - -import { AppComponent } from './app.component'; +import { FormsModule } from '@angular/forms'; +import { AppComponent } from './app.component'; @NgModule({ - imports: [ BrowserModule ], - declarations: [ AppComponent ], - bootstrap: [ AppComponent ] + imports: [ + BrowserModule, + FormsModule + ], + declarations: [AppComponent], + bootstrap: [AppComponent] }) export class AppModule { }