How to pass parameters in pop method of ionic2

后端 未结 8 1604
隐瞒了意图╮
隐瞒了意图╮ 2021-02-04 07:04

I tried passing parameters in push method of ionic2. like this

this.nav.push(SecondPage, {
    thing1: data1,
    thing2: data2
});

but is ther

8条回答
  •  旧时难觅i
    2021-02-04 07:56

    Currently, I believe that there is no way of accomplishing this.

    There is a Github issue for it though, that has got some great discussion on it by the Ionic core team. It sounds like they have added it to the Ionic 2 roadmap, too! The Github issue also has some proposed work-arounds, such as adding the ParentPage to the NavParams going to the ChildPage, but it is all quite a bit hacky.

提交回复
热议问题