i implement logout functionalitry and in that i set nav.popToRoot() nut when user click on logout button they didn’t redirect to login screen.
code that i used
static doLogout(service:WebService,alertCtrl:AlertController,nav:NavController)
{
try{
service.logout().map(res => res.text()).subscribe(
data => {
AllFunctions.closeLoading();
nav.popToRoot();
});
}catch(error)
{
AllFunctions.doAlert(Constants.error + '- 471',alertCtrl);
}
}
call above function when pressed logout button