Unable to navigate back

Hi, am unable to navigate back from chat details(Login->Chat Screen->Chat details). It is showing nothing on back click. It is showing error as ERROR Error: Uncaught (in promise): navigation stack needs at least one root page.

this.platform.registerBackButtonAction(() => {

So please help me how to solve

How are you navigating to chat details page?
Are you using this.navCtrl.setRoot(chatdetailspage) or this.navCtrl.push(chatdetailspage) ?

Hi, Thanks for the reply I am using this.navCtrl.setRoot(chatdetailspage).

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()

It is working. Thankyou. You saved my day.