I have the following textarea:
<textarea class="form-control" [(ngModel)]="content" name="content" required>
</textarea>
and the following submit button:
<button type="submit" class="btn btn-default" [disabled]="content.valid">New comment</button>
As I saw in the angular 2 form guide (https://angular.io/docs/ts/latest/guide/forms.html) I can use the x.valid
in order to check if it's not empty.
Why do I get TypeError: Cannot read property 'valid' of undefined
error?