Pages replacement

how can I replace the default page of ionic project as example make page2 is a home page instead of page1 ???

In app.component.ts:

export class AppComponent {

  public rootPage: any = 'Page2';



<ion-nav [root]="rootPage" [class]="theme"></ion-nav>

Really appreciate your help,but, I asked about ionic v1 there is no app.component.ts in it

$urlRouterProvider.otherwise('/yourstateurl'); as part of your .config

Practically speaking, when run on devices, the state it shows depends on whether you cold start your app or resume your app (latter case - it shows where you left off), so I always have a handler that decides where to go on either resume or cold start (typically needed if your app needs session based auth)

sorry for my newbie question but I don’t have enough info about ionic 1 can you please explain to me where to find .config in project because I search in my app about it but I don’t found and file with .config extension is one way to do it. The “.otherwise” part defines the entry page. Change that to another view and it will load up first.

great, many thanks to you