Created
August 10, 2016 18:49
-
-
Save kbailles/9a9e8e1af630ac2c361290ca7ba1dd85 to your computer and use it in GitHub Desktop.
Look at this
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 (ngSubmit)="save()" #projectForm="ngForm"> | |
<div> | |
<input [(ngModel)]="project.name" | |
required | |
name="name" | |
#name="ngModel"> | |
</div> | |
<div [hidden]="name.valid || name.pristine" class="alert"> | |
Name is required | |
</div> | |
<div> | |
<button [disabled]="!projectForm.valid" type="submit">Save</button> | |
</div> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment