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 8836781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:34:21+00:00 2026-06-14T09:34:21+00:00

I am working on an application that uses Ember.js and Handlebars.js. I have noticed

  • 0

I am working on an application that uses Ember.js and Handlebars.js. I have noticed that there can be a bit of a delay displaying templates when the page first loads. It makes sense that this happens since javascript has to create the HTML. When the page first loads it looks like a blank page has loaded, then suddenly everything appears.

Honestly, this is a problem that I can live with, but still it seems a bit awkward to me. I may just be over-analyzing things, but has anyone else noticed this and does anyone have a recommendation for how to make page loads appear more “natural”?

  • 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-14T09:34:22+00:00Added an answer on June 14, 2026 at 9:34 am

    As I commented above, you can show a spinner while the page is rendering, loading data etc. As an example, below is a Mixin which shows a spinner until a View has rendered:

    App.ShowSpinnerWhileRendering = Ember.Mixin.create({
      layout: Ember.Handlebars.compile('<div class="loading">{{ yield }}</div>'),
    
      classNameBindings: ['isLoaded'],
    
      didInsertElement: function() {
        this.set('isLoaded', true);
        this._super();
      }
    });
    

    In the case where you want to wait for data to load (assuming that you use the router for showing views):

    App.ShowSpinnerWhileRendering = Ember.Mixin.create({
      layout: Ember.Handlebars.compile('<div class="loading">{{ yield }}</div>'),
    
      classNameBindings: ['isLoaded'],
    
      isLoaded: function() {
        return this.get('isInserted') && this.get('controller.isLoaded');
      }.property('isInserted', 'controller.isLoaded'),
    
      didInsertElement: function() {
        this.set('inserted', true);
        this._super();
      }
    });
    

    And mix it into your views:

    App.ApplicationView = Ember.View.extend(App.ShowSpinnerWhileRendering, {
     // ...
    });
    

    Then define some CSS rules to show a loading spinner (or something) on an element having a showSpinner class, and hiding it when it also has a isLoaded class:

    .loading{
      background-image: url("spinner.png") 
      background-color: #DFDFDF
    }
    
    .is-loaded .loading {
      /* back to default styling, e.g. */
      background-image: none
      background-color: white
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am thinking of working on a Rails application that uses PostgreSQL. I have
So I have been working on this phone gap application that uses jquery-mobile. Recently,
I am currently working on rails3 application that uses jQuery. I have a javascript
I am working on a Silverlight application that uses WCF. I need to have
I have a working web application that uses username/password SpringSecurity configuration. Now I want
I am working on an application that uses Swing. I have a JTabbedPane, and
I'm working on an application that uses the Google Maps API. I have no
I am working in graphical application that uses objects and groups. So, items can
I need a working example of an application that uses an expandableListView. I have
I am working on an application that uses Swing. I have successfully created a

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.