# popTo with ionic

**URL:** <https://forum.ionicframework.com/t/popto-with-ionic/97826>\
**Category:** ionic-v3\
**Created:** [July 12, 2017, 7:10am UTC](https://forum.ionicframework.com/t/popto-with-ionic/97826 "2017-07-12T07:10:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anivaishu](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@anivaishu](https://forum.ionicframework.com/u/anivaishu)\
**Post date:** [July 12, 2017, 7:10am UTC](https://forum.ionicframework.com/t/popto-with-ionic/97826/1 "2017-07-12T07:10:17Z")

</div>

Hi,

I developed Ecommerce app.

If the user orders the products Need to [authenticated.So](http://authenticated.So) going to SigninPage.

I passed the query params in nav.push.user after signin.

Here is my code

```auto
this.navCtrl.push('CustomershippingPage',{Page:'Signin'});

```

.  
Going to `CustomershippingPage`.

If user go to back click **nav backbutton**.

I Check the query params value is Signin and page is pop to `cartPage`

Here is my code.

```auto
        if(this.Page == 'Signin')
  	 {
  	    this.navCtrl.popToRoot('CartPage');	
  	 }

```

But it does not work.The page is pop to Signinpage.why?

Kindly advice me,

Thanks.

---

<div class="post-metadata">

**Author:** ![FnnHuman](https://avatars.discourse-cdn.com/v4/letter/f/5f8ce5/32.png) [@FnnHuman](https://forum.ionicframework.com/u/FnnHuman)\
**Post date:** [July 12, 2017, 7:14am UTC](https://forum.ionicframework.com/t/popto-with-ionic/97826/2 "2017-07-12T07:14:09Z")

</div>

maybe try  
`this.navCtrl.setRoot('CustomershippingPage',{Page:'Signin'});`

---

<div class="post-metadata">

**Author:** ![anivaishu](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@anivaishu](https://forum.ionicframework.com/u/anivaishu)\
**Post date:** [July 12, 2017, 7:17am UTC](https://forum.ionicframework.com/t/popto-with-ionic/97826/3 "2017-07-12T07:17:34Z")

</div>

Thanks for ur reply.i am getting this error

```auto
TypeError: Cannot create property 'direction' on string 'CartPage'

```
