简体   繁体   English

离子推送通知点击功能

[英]Ionic push notification clicked function

In ionic push doc, I can't find method where it catch users' click. 在ionic push doc中,我无法找到吸引用户点击的方法。 I tried below code but it doesn't work. 我尝试了下面的代码,但没有用。 Any idea? 任何想法?

var push = new Ionic.Push({
"debug": true
});

      push.register(function(obj) {

        //save to db           


      });

      push.notificationCallback(function(data){
        console.log(data); // doesn't work
      })

This is the event for capturing notification click : 这是捕获通知单击的事件:

    push.on('notification', function(data) {
           console.log(data);
    });

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM