Coggle requires JavaScript to display documents.
import { FormsModule } from '@angular/forms';
NgForm
<form>
FormGroup
NgModel
ngNoForm
<form #f="ngForm"></form> <pre>{{ f.value | json }}</pre>
<form #f="ngForm" (ngSubmit)="onSubmit(f.value)"></form>
<form> <input type="text" name="username" ngModel> </form>
exportAs
value
<form> <input type="text" name="username" ngModel #c="ngModel"> <pre>{{ c.value }}</pre> </form>
NgModelGroup
NgForm.value
<form #f="ngForm"> <div ngModelGroup="fullName"> <input type="text" name="firstName" ngModel> </div> </form> <!-- Uzyskiwanie dostepu do wartosci z zagniezdzonego obiektu--> <pre>First name: {{f.value.fullName.firstName }}</pre>
form
import { ReactiveFormsModule } from '@angular/forms';
FormControl
<input>
HTML
let username = new FormControl('wartosc_poczatkowa');
FormControl.FormGroup
date
let formModel = new FormGroup({ from: new FormControl(), to : new FormControl() });
FormArray
let formModel = new FormGroup({ emails: new FormArray([ new FormControl(), new FormControl() ]) });