|
|
@ -1,5 +1,5 @@ |
|
|
|
import { Component } from '@angular/core'; |
|
|
|
import { FormControl } from '@angular/forms'; |
|
|
|
import { FormControl, FormGroup } from '@angular/forms'; |
|
|
|
|
|
|
|
|
|
|
|
@Component({ |
|
|
@ -8,9 +8,9 @@ import { FormControl } from '@angular/forms'; |
|
|
|
styleUrls: ['./app.component.css'], |
|
|
|
}) |
|
|
|
export class AppComponent { |
|
|
|
readonly condition = new FormControl(); |
|
|
|
readonly form = new FormGroup({ |
|
|
|
id:new FormControl(), |
|
|
|
password: new FormControl(), |
|
|
|
}); |
|
|
|
|
|
|
|
onSearch(): void{ |
|
|
|
console.log(`查詢條件:${this.condition.value}`); |
|
|
|
} |
|
|
|
} |