Skip to content
This repository was archived by the owner on Jul 24, 2026. It is now read-only.
This repository was archived by the owner on Jul 24, 2026. It is now read-only.

Canvas2Image Plugin #55

Open
Open

Description

@mario-aleo

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.

Activity

  1. positlabs commented on Oct 12, 2015

    @positlabs

    What is defining window.plugins?

    I'm guessing if you follow the example code, it will work.

    window.canvas2ImagePlugin.saveImageDataToLibrary(...)

  2. positlabs commented on Oct 13, 2015

    @positlabs

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions