Open pujan1 opened 7 years ago
Hi @pujan1 ,
There isn't, but you can subscribe to the on emitter this.service.getChangeEmitter().subscribe
, then when you receive a clean event just fire window.open()
.
@flauc Do you mind giving a quick example of what you meant ^^?
I was able to come up a hacky way as a workaround:
testPushNotify(){ console.log(this.toNotify); this._pushNotifications.create("Hello World", {body: 'Chicken Wings'}).subscribe( (res: any) => {console.log(res['notification']), res['notification']['onclick'] = this.event}, (err:any) => console.log(err) ); }
event(){ //Whatever you want to do once push notification is clicked -- window.open("http://localhost:3000/"); }
Is there a function for this service where if a user clicks the push notification, then it redirects to some url ?