Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49164

Notification callback function!

$
0
0

@eldy wrote:

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?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49164

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>