NavController push method option

Where can I found how to pass options in push method .I check http://ionicframework.com/docs/v2/api/components/nav/NavController/ but not find example with option object .
I want to know structure of the Option object.

Hey there!

So are you talking about passing data along like NavParams?
http://ionicframework.com/docs/v2/api/components/nav/NavParams/

They get passed along as an object.

class MyClass{
   constructor(nav:NavController){
     this.nav = nav;
   }

   pushPage(user){
     this.nav.push(SecondView,{
      // user is an object we have in our view
      // typically this comes from an ngFor or some array
      // here we can create an object with a property of
      // paramUser, and set it's value to the user object we passed in
      paramUser: user
     });
   }
}

I guess @kuntal has talked about the third parameter in this method, opts:

push(page, params, opts)

I’m also interested in options. Can you tell us about this?

@Chudovische see the docs here

e.g

pushPage(user){
     this.nav.push(SecondView,{
      // user is an object we have in our view
      // typically this comes from an ngFor or some array
      // here we can create an object with a property of
      // paramUser, and set it's value to the user object we passed in
      paramUser: user
     },{
      // here we can configure things like the animations direction or
      // or if the view should animate at all.
      direction: 'back'
     });

I’ve read the docs. I see only one example of options object with only one parameter ‘direction’, without description, what it do.
Where I can see full set of parameters and their descriptions and possible values?

For the most part, you shouldn’t be altering those at this point in time. Once thing stabilize, the options will be documented more. But for, hold off :grin:

1 Like
animate?: boolean;
animation?: string;
direction?: string;
duration?: number;
easing?: string;
id?: string;
keyboardClose?: boolean;
progressAnimation?: boolean;
disableApp?: boolean;
minClickBlockDuration?: number;
ev?: any;
updateUrl?: boolean;
isNavRoot?: boolean;

any update on this matter?