Setting a certain page as the root

hai guys… I’m building an application and an issue came along…
there is a set of pages in my application containing some products category page -> product info page -> cart page -> place order page.(place order is just a page where user gives his credentials and it is stored in the db) after hitting ‘place order’ I want the app to set the root to home Page
I tried :

this.nav.setRoot(HomePage); // by using this i was able to go to homepage but along with a back button in the navigation bar; // I tried using this but it gets error saying its deprecated.

I’m almost reached the stage of finishing up my application… please help

mmmmh I’m guessing it’s a warning not an error, if you are facing this msg

(getRootNav) is deprecated and will be removed in the next major release. Use getRootNavById instead.

if so, don’t know but personally I still use;

till I see the proper solution