I have the following json
{"message": "457896","additionalData":{"google.message_id":"0:149534266","coldstart":false,"collapse_key":"com.ionicframework.lucasteste693113","foreground":true}}
How can I give an alert to show all information?
I'm trying to show you all the information I've tried to do:
.controller('principalController', function($http, $scope, $sce, $stateParams, $ionicScrollDelegate, $timeout, $rootScope, $cordovaPushV5) {
$rootScope.$on('$cordovaPushV5:notificationReceived', function(event, notification){
// esse nao veio
alert("result: " + JSON.stringify(notification.message) + JSON.stringify(notification.additionalData.google.message_id));
//{"message": "457896","additionalData":{"google.message_id":"0:149534266","coldstart":false,"collapse_key":"com.ionicframework.lucasteste693113","foreground":true}}
});
})
And it did not work, could anyone help me?