2017-09-27 2 views
0

J'ai implémenté la notification push FCM dans mon application ionique 3 et je veux l'afficher de manière jolie. pour l'instant, je montre juste une alerte quand je reçois une notification. Je cherche une autre façon d'afficherafficher la notification push de manière jolie en ionique 3

ionViewDidLoad() { 
FCMPlugin.onNotification(function (data) { 
    if (data.wasTapped) { 
    //Notification was received on device tray and tapped by the user. 
    alert(data.message); 
    } else { 
    //Notification was received in foreground. Maybe the user needs to be notified. 
    alert(data.message); 
    } 
}); 
FCMPlugin.onTokenRefresh(function (token) { 
    alert(token); 
}); 

}

Répondre