When you use setroot, the root for navigation stack is set to chatdetailspage. And if you have to leave that page, you have to set some root for the navigation stack.
To navigate from chatscreenpage to chatdetailspage;
import { ChatdetailsPage } from ../chatscreen/chatscreen;
.
.
.
export class ChatscreenPage {
chatdetailspage = ChatdetailsPage ;
.
.
.
function() {
this.navCtrl.push( this.chatdetailspage);
}
}
When you navigate from login to chat screen, use navCtrl.setRoot(chatscreenpage)
Now the root of navigation stack will be the chat screen
you can navigate to any other page using navCtrl.push(#page) and navCtrl.pop()