Ionic prevent android back buttton

Hi Please suggest,
After login to my page3 ,if android hardware back button is pressed then ideally APP should exit but unfortunately app is landing on my page2

One of the major concepts of Ionic’s navigation system is the nav stack. If you push pages onto it, the back button will pop you to the previous page on the stack. If you don’t want that to happen, don’t push pages onto the navigation stack. Simply use setRoot() instead.

Thanx for your help :+1: