I am trying to insert a Signature pad into my App. The Signature logic works in plain HTML, but not when used with Ionic. I am New to this stuff, so if you have an answer, please explain clearly. Here is my code:
In my index.html:
In the app.js:
var canvas = document.getElementById(‘signatureCanvas’);
signaturePad = new SignaturePad(canvas);
In my signature.html:
<canvas id=‘signatureCanvas’ width=‘300’ height=‘180’></canvas>
I have read that it is because the DOM is not done loading before it tries to create the Signature canvas, and that I should move my logic “inside a function” or use “Jquery”, but I do not know how to do this, and have not found any good examples. If you know how to do this, please teach me how.