, that means I need to something in the onNotificationAPN function.
In the github README doc, onNotificationAPN is a global function, so it’s OK.
However, in my case, I want to show a view when user clicks the push notification,that means I need to register a function within my controller other than global, so I can call $location or $scope to change the view.
To show a particular view you can try this:
var redirectToView = function(object) {
var url = ‘/URL_to_view’;
$rootScope.$apply(function() {
$location.path(url);
});
};
Have you solved this? would you be willing to share your code? I also would like my push notifications to open a url, but I’m having the same problem with the global function callback not being in sync with angular.
I tried ng-cordova $cordovaPush, but the docs are so sparse (but so well styled . . . ).