Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

Ionic is not defined when using ionic-push

$
0
0

Hi all,

I'm trying to use ionic-push-notification feature. I am carefully following the push from Scratch tutorial that you can find here: http://docs.ionic.io/docs/push-from-scratch

I always get the same error: Ionic is not defined, when I'm implementing this piece of code to register to the Push:

`.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
var push = new Ionic.Push({
"debug": true
});

push.register(function(token) {
console.log("Device token:",token.token);
});`

Thanks if someone can help me.


Viewing all articles
Browse latest Browse all 228595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>