Issue with multiple instances of SignaturePad in Ionic v1

I am working on one app, where there are multiple signature pads displayed on the screen, depending on size of array.

I am running a loop, and then using below code for the signature pad:

$scope.signatures[i][x] = new SignaturePad(canvas, {
    onEnd: function (res) {}
}).toDataURL();

When I sign signaturePads and hit save, I do not get updated signature’s base64, instead, $scope.signatures array returns default white images, with no signatures as in image below:

If i use simple variable (non array) like $scope.sign = new SignaturePad…

It is working.

Any help would be appreciated :slight_smile: