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.

one progress-bar for tabbar->tabs(s)



  • Greetings from Luxembourg,
    when a tabbar is used, loading two different html pages (see example below),
    each tab fetching separate json data ( on init ),
    the tab finishing the fetch first, will stop the progress-bar.

    Is there a best practice to handle loading data in that scenario? (on show? grouping the fetch(es)?

    Thank you in advance.


    <ons-progress-bar></ons-progress-bar>
    <ons-tabbar>
    <ons-tab page=“a.html” label=“a” active>…
    <ons-tab page=“b.html” label=“b”>…



  • @alpl said in one progress-bar for tabbar->tabs(s):

    Greetings from Luxembourg,
    when a tabbar is used, loading two different html pages (see example below),
    each tab fetching separate json data ( on init ),
    the tab finishing the fetch first, will stop the progress-bar.

    You can addEventLister “post change” event to document or ons-tab when you want to fetch data,
    https://onsen.io/v2/api/js/ons-segment.html#event-postchange

    For me, is better to separate the fetches to have more control, but if data are linked together, maybe is better grouping them