Search code examples
cordovaphonegaphtml-framework-7cordova-plugin-camera

Cordova camera capture photo problem after visit another route


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?


Solution

  • simple: just call the eventListener function on page:init