popTo with ionic


#1

Hi,

I developed Ecommerce app.

If the user orders the products Need to authenticated.So going to SigninPage.

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

Here is my code

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.

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

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

Kindly advice me,

Thanks.


#2

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


#3

Thanks for ur reply.i am getting this error

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