diff --git a/src/app/app.component.css b/src/app/app.component.css
index 34633e7..ba43f51 100644
--- a/src/app/app.component.css
+++ b/src/app/app.component.css
@@ -1,11 +1,3 @@
p {
font-family: Lato;
}
-
-.data-empty {
- margin: 10px 20px;
- padding-left: 5px;
- border: solid 1px #aaa;
- text-align: center;
- line-height: 32pt;
-}
diff --git a/src/app/app.component.html b/src/app/app.component.html
index 891a4fc..dee3748 100644
--- a/src/app/app.component.html
+++ b/src/app/app.component.html
@@ -1,4 +1,4 @@
-
查詢條件:{{ condition | json }}diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 357d769..41d969d 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,13 +1,14 @@ -import { Component, Inject, OnInit } from '@angular/core'; -import { Observable } from 'rxjs'; - +import { Component } from '@angular/core'; @Component({ selector: 'my-app', templateUrl: './app.component.html', - styleUrls: [ './app.component.css' ], - providers:[{provide:'Message', useValue:'定義在根元件的訊息'}], + styleUrls: ['./app.component.css'], }) export class AppComponent { + condition = ''; + onSearch(): void { + console.log(`查詢條件:${this.condition}`); + } } diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 6a30fea..ad409b8 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,15 +1,14 @@ +import { FormsModule } from '@angular/forms'; import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { HttpClientModule } from '@angular/common/http'; import { HTTP_INTERCEPTORS } from '@angular/common/http'; import { AppComponent } from './app.component'; -import { ChildComponent } from './child/child.component'; -import { ParentComponent } from './parent/parent.component'; @NgModule({ - imports: [BrowserModule, HttpClientModule], - declarations: [AppComponent, ChildComponent, ParentComponent], + imports: [BrowserModule, FormsModule], + declarations: [AppComponent], bootstrap: [AppComponent], }) export class AppModule {} diff --git a/src/app/child/child.component.css b/src/app/child/child.component.css deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/child/child.component.html b/src/app/child/child.component.html deleted file mode 100644 index 8c58a2e..0000000 --- a/src/app/child/child.component.html +++ /dev/null @@ -1,2 +0,0 @@ -