访问另一条路线后,Cordova 相机拍摄照片问题

Cordova camera capture photo problem after visit another route

我用一个按钮来拍照, 它工作正常, 但是我在访问另一个 link/route 后无法拍摄照片。 这是我的代码示例:

document.getElementById("imageCapture").addEventListener("click", imageCapture);
function imageCapture() { 
//code for camera take picture
}

有没有page:init或者其他方法?

简单: 只需在 page:init

上调用 eventListener 函数