Catch ionic push on notification received event

i want to catch the onNotification event when the push notification is sent from my backend and reset the badge number and also set the state payload tht the page should go to when d notification is clicked on. Nothing happens on my current onNotification event which is like this

I am using Ionic.Push and in my app.js after my ionicPlatform.ready, i changed to this but it still doesnt catch it

var push = new Ionic.Push({
“onNotification”: function(notification) {
console.log(“NOTIFICATION RECEIVED”)
},
“pluginConfig”: {
“android”: {
“iconColor”: “#0000FF
}
}
});

I did this also bt it also doesnt get it, probly cos im using phonegap-plugin-push

$rootScope.$on(’$cordovaPush:notificationReceived’, function(event, notification) {
alert(“SUCCESSFULLY RECEIVED NOTIFICATION”);
if (notification.alert) {
navigator.notification.alert(notification.alert);
}

  if (notification.badge) {
    console.log(notification.badge)
    $cordovaPush.setBadgeNumber(notification.badge).then(function(result) {
      // Success!
    }, function(err) {
      // An error occurred. Show a message to the user
    });
  }
});

I tried this as well but it didnt work as well.

var push = new Ionic.Push({

});
push.on(‘notification’, function(data) {
console.log(“IT WAS RECEIVED”)
console.log(data.message);
console.log(data.title);
console.log(data.count);
console.log(data.sound);
console.log(data.image);
console.log(data.additionalData);
});
This gives me an error saying push.on is not a function even wheni switch to push.notification(), i get the same error.

This is very frustrating. Any help is appreciated

Have you found a solution to this? I am getting the same error: here