Last active
February 4, 2017 21:18
-
-
Save matthieu-D/49425c632a40cad5c23e8096a6b4f7d6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form #userForm="ngForm" (ngSubmit)="onFormSubmitted(userForm)"> | |
<label> | |
<span>Name</span> | |
<input type="text" name="name" placeholder="Name" [(ngModel)]="user.name" required> | |
</label> | |
<div> | |
<label> | |
<span>Email</span> | |
<input type="email" name="email" placeholder="Email" [(ngModel)]="user.email" required> | |
</label> | |
</div> | |
<div ngModelGroup="address"> | |
<label> | |
<span>Country</span> | |
<input type="text" name="country" placeholder="Country" [(ngModel)]="user.address.country" required> | |
</label> | |
<div> | |
<label> | |
<span>City</span> | |
<input type="text" name="city" placeholder="City" [(ngModel)]="user.address.city" required> | |
</label> | |
</div> | |
</div> | |
<input type="submit" [disabled]="userForm.invalid"> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment