Friends,
I am using some form fields in a page . When I reach that page if Net connectivity lose show
error message. But when connectivity established I could not reuse that page without going backward. How to add a line of code to refresh that page when the condition in app.component.ts met as shown:
connectonchange=this.network.onchange().subscribe(() => {
switch (this.network.type) {
case '2g':
console.log('probably not very fast ...');
this.showToast("2G!");
break;
case 'wifi':
console.log('wohoo wifi ...');
this.showToast("WIFI");
break;
case 'none':
console.log('No network ...');
this.showToast("No Network");
//Experimental
//alert("ddTS: "+this.global1.navPage);
//this.synchronize();
break;
case '4g':
console.log('4G ...');
this.showToast("4G");
break;
case '3g':
console.log('3G ...');
this.showToast("3G");
break;
case 'unknown':
console.log('unknown network ...');
this.showToast("unknown Network");
break;
//unknown, ethernet, wifi, 2g, 3g, 4g, cellular, none
}
});
suppose if check 4G how i refresh that page …
please advise
Thanks
Anes