File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
frontend/src/angular/src/app/mcp-client Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 2424 </ div >
2525 </ div >
2626</ mat-toolbar >
27+ < form #userForm ="ngForm " (ngSubmit) ="submitForm() ">
2728< div class ="my-input-container ">
2829 < div class ="my-textarea ">
2930 < mat-form-field class ="example-full-width ">
3031 < mat-label > Query about books or movies</ mat-label >
31- < textarea matInput placeholder ="Ask about books or movies. "> </ textarea >
32+ < textarea matInput placeholder ="Ask about books or movies. " [(ngModel)] =" query " > </ textarea >
3233 </ mat-form-field >
3334 </ div >
3435 < div class ="my-button ">
35- < button matButton ="filled "> Basic</ button >
36+ < button matButton ="filled " type =" submit " > Basic</ button >
3637 </ div >
37- </ div >
38+ </ div >
39+ </ form >
Original file line number Diff line number Diff line change 1212 */
1313import { CommonModule } from '@angular/common' ;
1414import { Component } from '@angular/core' ;
15+ import { FormsModule } from '@angular/forms' ;
1516import { MatButtonModule } from '@angular/material/button' ;
1617import { MatToolbarModule } from '@angular/material/toolbar' ;
1718import { MatInputModule } from '@angular/material/input' ;
@@ -25,18 +26,25 @@ import { Router } from '@angular/router';
2526 MatToolbarModule ,
2627 MatButtonModule ,
2728 MatInputModule ,
28- MatFormFieldModule
29+ MatFormFieldModule ,
30+ FormsModule
2931 ] ,
3032 templateUrl : './mcp-client.component.html' ,
3133 styleUrl : './mcp-client.component.scss'
3234} )
3335export class McpClientComponent {
36+ protected query : string = '' ;
37+
3438 constructor ( private readonly router : Router ) { }
3539
3640 protected showList ( ) : void {
3741 this . router . navigate ( [ '/doclist' ] ) ;
3842 }
3943
44+ protected submitForm ( ) : void {
45+ console . log ( this . query ) ;
46+ }
47+
4048 protected logout ( ) : void {
4149 }
4250}
You can’t perform that action at this time.
0 commit comments