maxisam/ngx-clipboard

copy not working in some components Angular

yossimal95 opened this issue · 1 comments

Hi,
im using this in one component:

//copy board
  copyBoard() {
    this.CBcopy.copy(this.codeBlock.nativeElement.innerText);
  }

and its work great!

in other component im using this:

//copy code
   copy(str:string) {
    this.CBcopy.copy(this.test.nativeElement.innerText);// not working

    this.CBcopy.copy("test"); // also not working
   }

waht are the prblm?!

(they both have :

import { ClipboardService } from 'ngx-clipboard';
etc...

)

Please ask this in stackoverflow. Thx.