blob: 0eaa0d447b4554df83de46bec175782d0e0b85cb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
<form novalidate [formGroup]="form" (ngSubmit)="formValidated()">
<div class="avatar-and-textarea">
<img [src]="getUserAvatarUrl()" alt="Avatar" />
<div class="form-group">
<textarea placeholder="Add comment..." formControlName="text" [ngClass]="{ 'input-error': formErrors['text'] }" #textarea>
</textarea>
<div *ngIf="formErrors.text" class="form-error">
{{ formErrors.text }}
</div>
</div>
</div>
<div class="submit-comment">
<button *ngIf="isAddButtonDisplayed()" [ngClass]="{ disabled: !form.valid }">
Post comment
</button>
</div>
</form>
|