back button and refresh poppage
-
Hi everyone,
Is there a way when i was clicked back button and refresh all poppage events or refresh to page?
I have seen this page: http://tutorial.onsen.io/?framework=vanilla&category=reference&module=page
and
https://community.onsen.io/topic/1554/hardware-back-button-and-choppy-animations-android/6
and this
https://community.onsen.io/topic/1773/refresh-a-ons-page-after-poppage
but i cant refresh the backed page.
Thanks for your patiences.
-
@fatihucom I think it is answered in one of the topics you linked to. Use the
postpop
or theprepop
event to call any necessary function that refreshes your view. You can access the pages using theevent
object provided or withmyNavigator.pages
array.
-
Thanks for your reply @Fran-Diox.
I used myNavigator.pages array.
let pages = document.querySelector('ons-navigator').pages; for (let i = 0; i < pages.length; i++) { if ('pageId' === pages[i].id) { console.log('refresh'); } }