Angular.js dependency injection in global function
问题 I am writing a cordova application with angular.js. When I use the PushPlugin to send push notifications to the user. I have register the user phone like this: var pushNotification = window.plugins.pushNotification; pushNotification.register(successHandler, errorHandler, { "senderID": [gmc_project_number], "ecb": "app.onNotificationGCM" }); The last parameter that I pass is app.onNotificationGCM this is a function that is called when I receive a notification. This is the implementation of