Notice: The Monaca & Onsen UI Community Forum is shutting down.
For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.
Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.
How to navigator back to the tabbar page in onsen ui with VUE?
-
I test this demo https://github.com/OnsenUI/vue-onsenui-kitchensink
When i navigator to page A, then to page B, the to page C, then I wan’t navigator to the root tabbar page, but it got error :
“Uncaught (in promise) ons-navigator’s page stack is empty.”
this code from store.js
navigator: { strict: true, namespaced: true, state: { stack: [], options: {} }, mutations: { push(state, page) { state.stack.push(page); }, pop(state) { if (state.stack.length > 1) { state.stack.pop(); } }, replace(state, page) { state.stack.pop(); state.stack.push(page); }, reset(state, page) { state.stack = [page || state.stack[0]]; }, options(state, newOptions = {}) { state.options = newOptions; } } },
When i call the reset function, it got that error. Thank you very much!