Created
October 14, 2017 18:45
-
-
Save alexzuza/facf42995014f7498b8389c9b931dcec to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import { Component } from '@angular/core'; | |
import { ControlContainer, NgForm } from '@angular/forms'; | |
@Component({ | |
selector: 'address', | |
template: ` | |
<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> | |
`, | |
viewProviders: [ { provide: ControlContainer, useExisting: NgForm } ] | |
}) | |
export class AddressComponent {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment