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-postchangeFor me, is better to separate the fetches to have more control, but if data are linked together, maybe is better grouping them