initializeApp(){
this.platform.ready().then(() => {
{
document.addEventListener("deviceready", onDeviceReady, false);
}
function onDeviceReady() {
console.log(navigator.camera);
console.log("Cordova");
}
}
We are trying to run the onDeviceReady function and console.log will not print out
initializeApp(){
this.platform.ready().then(() => {
console.log(navigator.camera);
console.log("Cordova");
}
}
Platform.ready()
resolves when deviceready
has fired, so listening for it again is unnecessary. In this case, listening for it after it has fired will cause that handler to never execute.