I have a fairly basic reactive form in Angular 5 with the following ngx-clipboard markup:
<form [formGroup]="shareForm">
<mat-form-field>
<input matInput formControlName="shareUrl"
placeholder="Click to copy URL" readonly="true"
[ngxClipboard]="currentUrl" (cbOnSuccess)="onClipboardCopy()">
</mat-form-field>
</form>
However, the page throws an error:
Error: Target should be input or textarea
Why does ngx-clipboard not see the input as the target?