Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | 1x 8x 8x 8x 8x 2x 1x | import { Component, EventEmitter, OnInit, Output } from '@angular/core'; import { CommonModule } from '@angular/common'; import {MatFormFieldModule} from '@angular/material/form-field'; import {FormControl,FormsModule,ReactiveFormsModule } from '@angular/forms'; import {MatInputModule} from '@angular/material/input'; import {MatSelectModule} from '@angular/material/select'; import {MatIconModule} from '@angular/material/icon'; import {MatButtonModule} from '@angular/material/button'; import { MatPaginatorModule} from '@angular/material/paginator'; import { MatTableModule } from '@angular/material/table'; import { MatTableDataSource } from '@angular/material/table'; import { FormType } from '../wo-table'; import { WorkoutService } from '../Service/workout.service'; @Component({ selector: 'app-input-form', standalone: true, imports: [CommonModule, FormsModule, ReactiveFormsModule, MatFormFieldModule, MatInputModule, MatSelectModule, MatIconModule, MatButtonModule, MatPaginatorModule, MatTableModule], templateUrl: './input-form.component.html', styleUrl: './input-form.component.css' }) export class InputFormComponent { public wout_List: string[] = []; constructor(public service:WorkoutService ){ this.wout_List = this.service.putOptions(); } @Output() updateData = new EventEmitter<FormType>(); onSubmit(formData: FormType){ // check if any of the form input field is empty ,then it will not allow any submission if(formData.name!='' && formData.workout_type!='' && formData.minutes) this.updateData.emit(formData); } } |