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..
I had the same error when serving to the browser, but not when emulating to ios. Thanks, @batanasov for the suggestion.