added create fonction, fetch, and delete
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<form nz-form nzLayout="horizontal" [formGroup]="profilForm" (ngSubmit)="submitForm()">
|
||||
<form nz-form nzLayout="horizontal" [formGroup]="profilForm">
|
||||
<nz-form-item nz-flex>
|
||||
<nz-form-label nzSpan="9" nzRequired>
|
||||
Prénom
|
||||
|
||||
@@ -31,15 +31,4 @@ export class ProfilForm {
|
||||
fonction: new FormControl<string>(null, [Validators.required]),
|
||||
password: new FormControl<string>(null, [Validators.required])
|
||||
})
|
||||
|
||||
submitForm() {
|
||||
// Pour annuler si le formulaire est invalide
|
||||
if (this.profilForm.invalid) return;
|
||||
|
||||
// Pour obtenir la valeur du formulaire
|
||||
console.log(this.profilForm.getRawValue())
|
||||
|
||||
// Pour vider le formulaire
|
||||
this.profilForm.reset()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user