Handle Hardware Back button in Rc0

Here is how I do it in mine

  this.platform.registerBackButtonAction(() => {
    console.log('back button pressed')
    if (this.nav.canGoBack()) {
      console.log('nav can go back')
      this.nav.pop()
    } else if (this.nav.getActive().component.name == "ListPage") {
      this.nav.setRoot(MixesPage)
    } else {
      this.showConfirmExit()
    }
  }, 100);