Add a download indicator to the application. Installed packagesachach: spin. In the router I registered

Router.configure({ loadingTemplate: 'loading', waitOn: function () {return Meteor.subscribe('tasks');} }); Router.onBeforeAction('loading'); 

Template itself loading

 <template name="loading"> {{> spinner}} </template> 

On the local machine, everything works fine, but as soon as I put it on the server, when I download the application, I get the message: Couldn't find a template named Are you sure you defined it?
The file with the router is in the lib folder in the root. I tried to put the loading.html template there, but it did not help (is it possible that the router loads before the template and does not see it)
Has anyone encountered such a problem?

    1 answer 1

    So the following was a solution to the problem:
    put the loading template from the loading.html file into the main.html file (loading.html file was deleted) and everything worked as it should.
    Can someone tell the logic of what is happening?