Canvas2ImagePlugin
Canvas2ImagePlugin copied to clipboard
Canvas2Image Plugin
Hello,
I need some help here, I'm using phonegap with angular.js, but i can't get you plugin work with angular. I've installed the plugin by cordova add plugin, on the onDeviceReady it's been called by:
var canvas2ImagePlugin = window.plugins.canvas2ImagePlugin;
and also I'm defining it on my controller as:
$scope.save = function(){
var cnv = document.getElementById('pwMainCanvas');
canvas2ImagePlugin.saveImageDataToLibrary(
function(msg){
console.log(msg);
},
function(err){
console.log(err);
},
'pwMainCanvas' /*or cnv, or pwMainCanvas*/
);
};
Someone already had made it or know what I'm doing wrong?
Thanks.
What is defining window.plugins
?
I'm guessing if you follow the example code, it will work.
window.canvas2ImagePlugin.saveImageDataToLibrary(...)
Actually...
I'm using cordova 5.3.3 for Android, and window.canvas2ImagePlugin
is not defined on window. It seemed to be working until I updated cordova from 4.x
Yes, I'm starting to think that the new Cordova is a problem with this plugin.