hello , i’m working on a app that will integrate the ionic push notification , so i started with demo provided , but when i try to register for the push i get this error :
"TypeError: Cannot call method ‘onReady’ of null
I/chromium(21359): at new e (file:///android_asset/www/lib/ionic-platform-web-client/dist/ionic.io.bundle.min.js:2:30167)
here is my controller code
var push = new Ionic.Push({
"debug": true
});
push.register(function(token) {
console.log("Device token:",token.token);
push.addTokenToUser(user);
user.save();
});
can any one help me ??
thanks