Skip to content

Instantly share code, notes, and snippets.

@alexzuza
Last active October 14, 2017 17:27
Show Gist options
  • Save alexzuza/66fac0461e2b91ed2b45f85511bb2ef5 to your computer and use it in GitHub Desktop.
Save alexzuza/66fac0461e2b91ed2b45f85511bb2ef5 to your computer and use it in GitHub Desktop.
<form #myForm="ngForm">
<div>
<label>Firstname:</label>
<input type="text" name="firstName" ngModel>
</div>
<div>
<label>Lastname:</label>
<input type="text" name="lastName" ngModel>
</div>
<fieldset ngModelGroup="address">
<div>
<label>Zip:</label>
<input type="text" name="zip" ngModel>
</div>
<div>
<label>Street:</label>
<input type="text" name="street" ngModel>
</div>
<div>
<label>City:</label>
<input type="text" name="city" ngModel>
</div>
</fieldset>
</form>
<pre>{{ myForm.value | json }}</pre>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment