# Issue with back button after navigating to page using menu from app.ts

**URL:** <https://forum.ionicframework.com/t/issue-with-back-button-after-navigating-to-page-using-menu-from-app-ts/97476>\
**Category:** ionic-v1\
**Created:** [July 9, 2017, 10:16am UTC](https://forum.ionicframework.com/t/issue-with-back-button-after-navigating-to-page-using-menu-from-app-ts/97476 "2017-07-09T10:16:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gurpreet\_singh](https://avatars.discourse-cdn.com/v4/letter/g/b77776/32.png) [@Gurpreet\_singh](https://forum.ionicframework.com/u/Gurpreet_singh)\
**Post date:** [July 9, 2017, 10:16am UTC](https://forum.ionicframework.com/t/issue-with-back-button-after-navigating-to-page-using-menu-from-app-ts/97476/1 "2017-07-09T10:16:36Z")

</div>

Using ViewChild and Nav option in Ionic2 I have implemented side menus. When I move from home page to any other page using side menu and then try to come back by clicking on the back button of my mobile(Android).  
Apps get’s closed. Can anyone pls help in this app. It’s quite urgent

I have below code in app.html

```auto

```

\<ion-menu [content]=“content”\>  
  
  
Menu

 {{p.title}} 

\<ion-nav [root]=“rootPage” #content swipeBackEnabled=“false”\>

```auto

in App.component.ts

```

import { Component, ViewChild } from ‘@angular/core’;  
import { Nav, Platform,AlertController,ToastController } from ‘ionic-angular’;

@Component({  
templateUrl: ‘app.html’  
})  
export class MyApp {  
@ViewChild(Nav) nav: Nav;

rootPage: any = HomePage;

```
openPage(page) {
	// Reset the content nav to have just this page
	// we wouldn't want the back button to show in this scenario
	this.nav.setRoot(page.component);
}

```

pages: Array\<{title: string, component: any}\>;  
constructor(public platform: Platform) {  
this.pages = [  
{ title: ‘Home’, component: HomePage },  
{ title: ‘About Us’, component: AboutUs },  
{ title: ‘Feedback’, component: Feedback },  
{ title: ‘Terms’, component: Terms }  
];  
}

```auto

```
