Notification callback function!

I’m pissed, try this shit the whole day it doesn’t work. I have no clue anymore guys!

.controller(‘mainCtrl’, function($ionicPlatform, $scope) {

function display_push_msg(){
  $ionicPlatform.ready(function() {
    console.log('wtf man!');
    var push = new Ionic.Push({
        "onNotification": function(notification) {
            var payload = notification.payload;
            console.log(notification, payload);
          }
    });
  });
}
display_push_msg();

});

I expect it will console something when I tap on the notification received. Hey what’s wrong here?