[Onsen UI 2 | Angular 2] ons-navigator - how to pass events or values back to previous page?



  • Hi guys,

    Using the navigator I want to navigate to a new page, select a value and return the selected value to the original page. Both pages are separate components in separate files. I know it’s possible to supply a data value in the ‘options’ when calling popPage, but how would the original page know that there is a new value? Is there a callback or event when the page is re-opened or when a new page.data value is set? Or is there perhaps an even better way to achieve this?

    Thanks.



  • @ypniag I know you have stated you are using Angular 2; however, this tutorial shows how to do this with Vanilla. It may provide you a starting point to implement it in Angular.

    http://tutorial.onsen.io/?framework=vanilla&category=Community tutorials&module=passing_data


Log in to reply