Fix attempty
This commit is contained in:
@@ -22,12 +22,18 @@ export class AppComponent {
|
||||
// NOTE: Update the init value below with your OneSignal AppId.
|
||||
OneSignal.init("13755f98-ec69-45fd-a2f1-d2166afcaa51");
|
||||
|
||||
|
||||
let myClickListener = async function(event) {
|
||||
let notificationData = JSON.stringify(event);
|
||||
};
|
||||
let notificationData = JSON.stringify(event);
|
||||
alert(notificationData);
|
||||
console.log('notificationOpenedCallback: ' + JSON.stringify(notificationData));
|
||||
|
||||
};
|
||||
OneSignal.Notifications.addEventListener("click", myClickListener);
|
||||
|
||||
/* OneSignal.Notifications.setNotificationOpenedHandler(function(opened) {
|
||||
let notificationData = JSON.stringify(opened);
|
||||
console.log('notificationOpenedCallback: ' + notificationData);
|
||||
}); //*/
|
||||
|
||||
// Prompts the user for notification permissions.
|
||||
// * Since this shows a generic native prompt, we recommend instead using an In-App Message to prompt for notification permission (See step 7) to better communicate to your users what notifications they will get.
|
||||
|
||||
Reference in New Issue
Block a user