Closed ShivamShokeen closed 3 years ago
@ViewChild('container')container:ElementRef; copyText(){ this._clipboardService.copy(this.container.nativeElement.innerText); } clear(){ this._clipboardService.destroy(this.container.nativeElement.innerText) }
I want to clear the copied text for that I am using destroy but it was giving an error of
container.removeChild is not a function
Can you tell me how to use destroy function. I can also use below code but this is not what I want
this._clipboardService.copy(' ');
Thank you :)
Because it is not designed for you to use it. this._clipboardService.copy(' '); I think it is what you can do. If you have more question, please ask in Stackoverflow.
I want to clear the copied text for that I am using destroy but it was giving an error of
container.removeChild is not a function
Can you tell me how to use destroy function. I can also use below code but this is not what I want
this._clipboardService.copy(' ');
Thank you :)