i use a button to capture photo, it works fine, but i'm unable to capture photo after visit another link/route. here is my code sample:
document.getElementById("imageCapture").addEventListener("click", imageCapture);
function imageCapture() {
//code for camera take picture
}
is there any page:init or any other method?
simple: just call the eventListener function on page:init