Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8951971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:46:16+00:00 2026-06-15T13:46:16+00:00

When a meteor app is deployed on server, it takes a considerable amount of

  • 0

When a meteor app is deployed on server, it takes a considerable amount of time (3-4 seconds) for the data to be fetched from mongodb. In my app, I have a template that is bound to data through an #each block helper.

{{#each items}}
    {{> item_info}}
{{else}}
    No items yet.
{{/each}}

So when the app loads in a new browser session, users see the message No items yet till the time data has finished loading. When data becomes available, that message gets replaced with the actual data. But this results in a bad user experience because some users actually think, for those 3-4 seconds, that they have lost their data.

My question is — is it possible to change that “else” message to something like “Loading…” while data is being fetched? Or is there a more elegant solution to this problem?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:46:17+00:00Added an answer on June 15, 2026 at 1:46 pm

    I think you should use Session with onComplete() function inside the Meteor.subscribe()

    This will executed automatically when the subscription is completed, i.e ur collections are completed loading on client.

    For Eg.

    Meteor.subscribe('yourCollection', function onComplete(){
    
             // set a session to true indicating your collection is loaded.
             Session.set('itemsLoaded', true);
    });
    

    Then call your template helper based on the session value as:

    Template.yourTemplate.isLoaded = function(){
    
         return Session.get('itemsLoaded'); 
    }
    

    And your html will look like:

    <template name="yourTemplate">
        {{#if isLoaded}}
            {{#each items}}
              {{> item_info}}
            {{/each}}
        {{/if}}
    
        {{#unless items}}
             <img src="images/loader.gif">
        {{/unless}}
    </template>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a meteor app that is feeding data in a MongoDB database to
I have a Meteor template that includes the following: {{#with selected_recipe}} {{>recipe}} {{/with}} In
How would I use a (live running) MongoDB to develop another meteor app? I
From a general glimpse of it, it seems that source code for Meteor app
I am new in Meteor, and especially in MongoDB. I have googled a lot
Under here you find a simple server/client app that sends the integer 5 from
My meteor app has a base.html file like this: <head> <title>MyApp</title> </head> <body> <template
When deploying a meteorjs app to their server, for instance james.meteor.com, can someone else
I am displaying a collection of messages in my Meteor app. When my template
I have some doubts with Meteor server? Whether will it send push notification like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.