Ionic history go back


#1

Hi,

I have a requirement in my app, when the user clicks ‘back button’ they have to land on the ‘parent-page’. Its representation can be seen below.

Main page --> Page A–>Page B–>page C

In the above representation, when the user lands on page C, and then when he clicks the back button instead of landing in Page B ,he should be able to see or direct to ‘Main page’.

It would be really helpful, if someone can provide me the solution for this.

Thanks


#2

use $ionicPlatform.registerBackButtonAction