VersoSolutions / CordovaClipboard

Clipboard management plugin for Cordova/PhoneGap
MIT License
144 stars 257 forks source link

Text not added to my phone clipboard #31

Open Meloakartas opened 7 years ago

Meloakartas commented 7 years ago

My Environment

Expected Behavior

To copy some text in my phone clipboard

Actual Behavior

No text is added

Code

I installed the plugin, added it to the imports in app.module.ts, added it in the providers.

Here is my home.ts code and the function called on button click :

...
import { Clipboard } from '@ionic-native/clipboard';

export class HomePage{

  constructor(public navCtrl: NavController, public modalCtrl: ModalController, private keyboard: Keyboard, public alertCtrl: AlertController, public storage: Storage, private clipboard: Clipboard) {

    }

  exportCards() {
    this.clipboard.copy("test");
  }
}

And then nothing is added to my clipboard ...

Thanks for your help !

davhad commented 7 years ago

Same issue here. That's my code: https://stackoverflow.com/questions/46587607/cordova-clipboard-fails-to-paste?noredirect=1#comment80267098_46587607