ngx-clipboard: call to this._clipboardService.copyFromContent(text) does not work
Hello, I’m using Angular 4 with ngx-clipboard. Static copy to clipboard works but when I want it dynamic with a call to this._clipboardService.copyFromContent(text). It doesn’t work.
I get this error:
ERROR in /home/yolo/gestman/src/app/elicitation-form/results/results.component.ts (191,5): Supplied parameters do not match any signature of call target.
Can someone help me? Angular 4 v4.4.7, ngx-clipboard v8.1.4 Thanks a lot Gilles
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 4
- Comments: 17 (5 by maintainers)
OK this is an issue with executing the copy command itself. It has to be done synchronously from a click command. Programmatically invoking a click invent on the hidden node should make the execCommand() work.
@maxisam thanks for your kind help
I think
document.execCommand("copy")
is not working in angular.