How to know register ionic 2

46 Views Asked by At

How to know if the device in ionic 2 is registered or not in the code? I currently have this:

private registerToken(){
    this.push.register().then((t: PushToken) => {
        return this.push.saveToken(t,{
            ignore_user: true
        });
    }).then((t: PushToken) => {
        console.log('Token saved:', t.token);
    });
}
0

There are 0 best solutions below