Fix sur les ajouts d'infos
This commit is contained in:
@@ -16,18 +16,18 @@ export class NewAircraftComponent implements OnInit {
|
||||
private serviceComm: ServiceComm,
|
||||
private serviceApi: AircraftService
|
||||
) {
|
||||
this.addForm = new FormGroup({
|
||||
aircraftName: new FormControl("", Validators.required)
|
||||
});
|
||||
this.addForm = new FormGroup(
|
||||
{
|
||||
aircraftName: new FormControl("", Validators.required)
|
||||
},
|
||||
{ updateOn: "blur" }
|
||||
);
|
||||
}
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
onSubmit(formData) {
|
||||
this.serviceApi.AddAircraft(formData.value.aircraftName);
|
||||
this.serviceApi.AddAircraft(formData.aircraftName);
|
||||
this.serviceComm.RefreshData(AddAction.Aircraft);
|
||||
|
||||
this.serviceComm.RefreshData(AddAction.Aircraft);
|
||||
this.addForm.reset();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user