I am new in ionic, I want to know how to use FCM in ionic v1 project Please help me. I am using Cordova-plugin-fcm. At first, i am installing this plugin in my project using this comment "ionic Cordova plugin add Cordova-plugin-fcm"
FCMPlugin.getToken(
function (token) {
alert('Token: ' + token);
console.log('Token: ' + token);
},
function (err) {
alert('error retrieving token: ' + token);
console.log('error retrieving token: ' + err);
}
);
then using this code in my app.js, $ionicPlatform.ready()
now the error is showing my browser console
FCMPlugin is not defined
please help me
Remove your plugin which you added and install these plugins by writing following command:
Note: Try removing your platforms and hooks if your problem persist and install the above plugin again.