After installing cordova-plugin-local-notifications and trying it again, I encountered an error on the following line of code:
cordova.plugins.notification.local.on("click", function (notification) {
The error message reads:
Error while processing route: dashboard Cannot read property 'notification' of undefined TypeError: Cannot read property 'notification' of undefined
When I commented out that line, I faced another error with the next line of code:
states[Connection.UNKNOWN] = 'Unknown connection';
Once again, this error indicated that the connection does not exist. After investigating, I suspected that there might be a missing cordova package or dependency. However, running the same set of code lines in another app's application.js did not result in any errors. Upon comparing the two applications, I found no discrepancies in the cordova-related entries in the package and bower json files.