Sending Push Notification Issue


#1

Hi everybody.
I am going to use phonegap push plugin but I got this issue:
ReferenceError: Can’t find variable: PushNotification

My code is here:
$ionicPlatform.ready(function() {
var push = new Ionic.Push({
“debug”: false,
“onNotification”: function(notification) {
alert(‘Received push notification!’);
},
“pluginConfig”: {
“android”: {
“iconColor”: “#0000FF
},
“ios”:{
“badge”: true,
“sound”: true
}
}
});
$rootScope.devicetoken = “a”;
push.register(function(token) {
// Log out your device token (Save this!)
console.log(“Got Token:”,token.token);
$rootScope.devicetoken = token.token;
})

What I am going to do is when I login to the app, I send userid, password, devicetoken to my backend server. Anyhow I can’t get devicetoken. What is wrong? Please help me