<form [formGroup]="form" (ngSubmit)="onSubmit()"> <!– … –> </form>
Snippet Category: angular form
export class MyFormComponent { form: FormGroup; constructor() { this.form = new FormGroup({ name: new FormControl(»), email: new FormControl(»), message: new FormControl(») }); } onSubmit() { // aquí puede acceder a… [Continuar Leyendo]