Reputation: 584
I installed ngCordova and included the js properly, I added the dependency too to my module, then I add clipboard plugin, then I do this code in my mainCtrl
$cordovaClipboard
.copy('text to copy')
.then(function () {
// success
alert('copied');
}, function () {
// error
});
I gotten the error of Cannot read property 'plugins' of undefined, I guess I've done everything correctly? What might me the cause, any idea guys? No clue here what's going on..
Upvotes: 3
Views: 4821
Reputation: 1298
You will have to emulate or deploy directly to the device to avoid this error. I notice also that if the app is hosted on https://apps.ionic.io/apps and rendered through Ionic View the native functionality still don't work for ngCodova
Upvotes: 2