]>
Commit | Line | Data |
---|---|---|
1 | <form novalidate [formGroup]="form" (ngSubmit)="formValidated()"> | |
2 | <div class="form-group"> | |
3 | <textarea placeholder="Add comment..." formControlName="text" [ngClass]="{ 'input-error': formErrors['text'] }"> | |
4 | </textarea> | |
5 | <div *ngIf="formErrors.text" class="form-error"> | |
6 | {{ formErrors.text }} | |
7 | </div> | |
8 | </div> | |
9 | ||
10 | <div class="submit-comment"> | |
11 | <button *ngIf="isAddButtonDisplayed()" [ngClass]="{ disabled: !form.valid }"> | |
12 | Post comment | |
13 | </button> | |
14 | </div> | |
15 | </form> |