Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70440

Call variables from method

$
0
0

@emryldrmr wrote:

pushSetup() {
    const options: PushOptions = {
      android: {
        senderID: '111111111111'
      },
      ios: {
        alert: 'true',
        badge: true,
        sound: 'false'
      }
    };

    const pushObject: PushObject = this.push.init(options);
    pushObject.on('registration').subscribe((data: any) => {
      //alert('Device token/handle is: ' + data.registrationId);
          this.regID = data.registrationId;
  });
  }

this registrationId actually any device registrationId.

I want a call the registrationId in

 ngOnInit() {
    console.log('ngOnInit GirisPage');
    this.menuCtrl.swipeEnable(false);
    this.menuCtrl.enable(false);
    this.logForm();
    **this.pushsetup();**
  }

but ı can’t make it. it’s undefined all the time

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70440

Trending Articles



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