IS there a solution for side menu hardware back button exit?

Is there a solution for back button exit an app that open a page from side menu, instead going back to home page?

I have google around but did not found one for ionic 1

hello gys when i am select the page in my side menu and go back with the help of mobile devide button but i am not able to go back on home page any idea to resolve this ishu plese share solution .

hy @bkcollection are you resolve your problem