Installed cordova-plugin-local-notifications and retried it. The line of code where the error occures -
cordova.plugins.notification.local.on("click", function (notification) {
Error:-
Error while processing route: dashboard Cannot read property 'notification' of undefined TypeError: Cannot read property 'notification' of undefined
On commenting that line, I got another error for the immediate next line
states[Connection.UNKNOWN] = 'Unknown connection';
Again giving an error saying connection doesn't exist. I assumed that there's some cordova package or dependency missing. But running this same lines of code on anoher app's application.js, gave no such error. there was nothing related to cordova missing from package and bower json files, when comparing the app that worked, with the one that didn't.
Aucun commentaire:
Enregistrer un commentaire