Network on connect triggers multiple times. when back to online in ionic 5. How to avoid it?
Here’s My code:
app.compent.ts:
initializeApp() {
this.platform.ready().then(() => {
this.network.onDisconnect().subscribe(() => {
alert('Back to online');
});
})
This will trigger alert multiple times.
Expected one alert when on connect.
Please help me.