Notification in Ionic 1


I applied code of receive notification …my code is

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

But result is zero…I have no idea about receive notification…reffering this example