I was following this article: Ionic Push Notification Guide
But after doing all the steps I keep getting a "Ionic is not defined" in the next line of the app.js of my ionic application:
var push = new Ionic.Push({
"debug": true
});
I dunno why this is happening, but this is my angular.module.run function complete for more insight in the matter:
.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
if (window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
cordova.plugins.Keyboard.disableScroll(true);
}
if (window.StatusBar) {
StatusBar.styleDefault();
}
var push = new Ionic.Push({
"debug": true
});
push.register(function(token) {
console.log("My Device token:",token.token);
push.saveToken(token);
});
});
})
Please, tell me any additional information I could provide to make this issue more clear.