popPage does not send data in options



  • I am trying to make some kind of a select behavior by showing extra page with options and then upon selection, the page is popped and information about the selection is passed to the previous page.

    The following line of code does not work as I expected:

    document.querySelector('#myNavigator').popPage({data: {val: 'val from pop'}});
    

    The hash from data is not available in the navigator.topPage.data

    Here is a codepen with the issue:
    https://codepen.io/piotrm/pen/AXGGKV

    Am I missing anything obvious?

    EDIT:
    onsen2 rc17, vanilla JS


  • Onsen UI

    @Piotr-Mitoraj After checking it for a while… I just realized you are actually not using rc.17. It’s rc.14.
    Update it to rc.17 and it will work ;)



  • oh, my bad! I updated only css definitions…Thanks a lot!


  • Onsen UI

    @Piotr-Mitoraj For the next time I’d recommend you to try things in our tutorial app and then export it to Codepen (there is a button to do it automatically). This way you will always use the latest version. And I think the interface is handy :)


Log in to reply