Hi, I’ve created a global page loader template and didn’t want to rely on a router based solution. The following code seemed to work in the beginning for me:
Template.onRendered(function () {
this.autorun(() => {
Tracker.afterFlush(() => {
endLoad();
});
startLoad();
});
});
Basically running a loader when the page is rendering and then stopping it when the page is loaded.
The problem I am finding is that I am using a lot of reactive data stores on my pages and the above code isn’t really tracking it well. Have looked into using Tracker.autorun, but don’t have a winning solution yet.
Any thoughts?