Skip to content

Instantly share code, notes, and snippets.

@lorenzojkrl
Last active July 3, 2022 18:36
Show Gist options
  • Save lorenzojkrl/93517f9306ed35aa43d59fa88c3c0d8e to your computer and use it in GitHub Desktop.
Save lorenzojkrl/93517f9306ed35aa43d59fa88c3c0d8e to your computer and use it in GitHub Desktop.
Angular Reactive Form
<div>
<form (ngSubmit)="onSubmit()" [formGroup]="reactiveForm">
<div>
<label for="name">Name</label>
<input id="name" type="text" formControlName="name" />
</div>
<div>
<label for="email">Email</label>
<input type="email" id="email" formControlName="email" />
</div>
<div>
<label for="age">Age</label>
<input type="number" id="age" formControlName="age" />
</div>
<button type="submit">Submit</button>
</form>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment