Questions tagged [ngx-clipboard]

ngx-clipboard is a native clipboard directive ported from clipboard.js.

ngx-clipboard is a native clipboard directive ported from clipboard.js. It was formerly known as angular2-clipboard.

It works with Angular version 2.0.0 and up. Starting with version 6.0.0, there is no other JS dependency anymore, just Angular.

You should read the documentation before asking questions here.

travis build npm GitHub release npm

15 questions
11
votes
1 answer

ERROR in Metadata version mismatch for module X found version 4, expected 3, resolving symbol Y

I'm trying to build an Angular 4 app with angular-cli (ng build) and which uses ngx-clipboard. I suddenly started getting the following error a few days ago, even though my application source code has not changed: ERROR in Metadata version mismatch…
Will
  • 6,601
  • 3
  • 31
  • 42
4
votes
2 answers

Angular2 - ngx-clipboard not working

I installed ngx-clipboard as mentioned in the documentation and included the js in systemjs.config as well. However I am getting below error: Unhandled Promise rejection: Template parse errors: Can't bind to 'ngxClipboard' since it isn't a known…
Peter
  • 10,492
  • 21
  • 82
  • 132
1
vote
0 answers

NGX-Clipboard not working in Angular project

After installing ngx-clipboard to my project, I keep experiencing this error. Is there anything I can do to solve this issue? Below is the error message I received: Failed to compile. ./node_modules/ngx-clipboard/fesm2015/ngx-clipboard.mjs…
Adeyinka
  • 21
  • 4
1
vote
0 answers

Change text of element upon cbOnSuccess in ngx-clipboard

Good morning, Using ngx-clipboard and ng2-tooltip-directive so that i can show an icon (with tooltip being 'copy to clipboard'). This is working, now upon success (using (cbOnSuccess)) i want to change the tooltip's text from "copy to clipboard" to…
Xyptilon
  • 11
  • 2
1
vote
1 answer

ngx clipboard subscribe to copyResponse$ not working

I'm using ngx-clipboard to copy some text to clipboard in my Angular application. constructor( private clipboardService: ClipboardService, ) { this.subscribeToClipboard(); } subscribeToClipboard() { …
user5155835
  • 4,392
  • 4
  • 53
  • 97
1
vote
0 answers

How can I copy rich text (with html tags)?

I am using a rich text editor (ckEditor) in my Angular 7 app. I now want an action button to copy the text entered in that editor to the clipboard, but via ngx-clipboard the html tags are literally in the text copied. How can I have the tags…
Eugene
  • 173
  • 1
  • 10
0
votes
0 answers

Angular - ngx clipboard throwing error when used for two elements in a same component

In my template, I have two form controls with copy to clipboard buttons The error I'm facing: Click on the second copy button and then Cancel or save the form throws error. Error in the dev tool console.
Sana Sait
  • 63
  • 5
0
votes
1 answer

how to add ngx-clipboard (or any similar library) to JHipster 6.10 Angular 10-based application?

So, I've tried with already 3 or 4 different ngx-* libraries, that promise to give capability to copy page content to Clipboard. Here's how it goes with ngx-clipboard, which seems to be the most up-to-date of them all, and promises Angular 10…
62mkv
  • 1,444
  • 1
  • 16
  • 28
0
votes
1 answer

How can I use protractor to test ngx-clipboard?

How can I use protractor to test ngx-clipboard ? I have tried using the following code with Chrome's navigator API but it doesn't work. Navigator is undefined...any ideas? try { const text = await…
snikt
  • 581
  • 4
  • 11
  • 27
0
votes
1 answer

ngx-clipboard is not copying to clipboard when instead a callback method

I have a service that I am running to retrieve device information, and I want to copy that back to the clipboard once it has been retrieved. I have the following code: callServiceToCopy() { let stringData = ''; let thingName: string =…
0
votes
1 answer

Why is ngxClipboard complaining about needing an input element?

I have a fairly basic reactive form in Angular 5 with the following ngx-clipboard markup:
isherwood
  • 58,414
  • 16
  • 114
  • 157
0
votes
2 answers

ngx-clipboard No provider for Token DOCUMENT

trying to use ngx-clipboard v.7.0.6 and use ClipboardService inside my component and getting this error: Promise rejection: No provider for Token DOCUMENT! ; Module: import {NgModule} from '@angular/core'; import…
0
votes
2 answers

Text not getting copied in modal in ngx clipboard

I am using ngx clipboard to copy my value to clipboard which is working fine if I do that in the main page but I want that functionality in my modal which is neither throwing any error nor copying anything. Angular-5.2.3 ngx-clipboard-9.1.3 Below is…
Akshay
  • 365
  • 1
  • 3
  • 20
0
votes
0 answers

Retaining the numbers of an ordered list from innerhtml string when using ngx-clipboard to copy contents from a div

I am using Angular2 and ngx-clipboard and am trying to copy the html content in a div:
user1892775
  • 2,001
  • 6
  • 37
  • 58
0
votes
1 answer

Ngx\clipboard Not working with Aot and Rollup

I have tried to implement aot in my app but While building my app with aot and rollup gets this error.I have used ngx-clipboard. 'ngx-clipboard/src/index' is imported by wwwroot\app\aot\app\app.module.ngfactory.js, but could not be resolved ΓÇô …
user3505487
  • 95
  • 2
  • 6