OneSignal: hide bell button on some pages(routes)
0
I have an SPA(angular v.5) application. I'm importing oneSignal by CDN. I have to hide the bell icon from one signal in some routes(pages). I tried something like this: ... const oneSignal = window.OneSignal try{ oneSignal.init({ /* My config */ }).then(() => { this.displayButton$.subscribe(value => { if (value) { oneSignal.notifyButton.launcher.show(); } else { oneSignal.notifyButton.launcher.hide(); } }); }) } catch(err) { ... This solution works perfectly for all browser except Safari(v. 12 MacOS). It happens because on safari oneSignal.notifyButton is equal to null. I didn't find those show and hide methods in docs. I found them in oneSignal code. I thought it could be because some polyfill is missed but I stuck with this idea. If anyone can h