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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:24:57+00:00 2026-06-16T03:24:57+00:00

I have an Ember method which fires when when new data arrives: insertDays: function()

  • 0

I have an Ember method which fires when when new data arrives:

insertDays: function() {
  ...
}.observes('startDate', 'doctor.appointments.length')

I want to check to make sure the data is actually there before I execute any heavy code. To do this I currently use:

var length = doctor.get('appointments.length')
if (length !== 0) {
    ...
}

However, there are occasionally times where there is legitimately no data being handed down from the server, and in this case my !== 0 test fails, and the code doesn’t execute when I want it to.

I’ve tried using the .isLoaded method but it always returns true regardless.

How do I effectively tell if an Ember resource is still loading?

  • 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-16T03:25:00+00:00Added an answer on June 16, 2026 at 3:25 am

    I got this working by using .isLoaded as an .observes property.

    The code is now structured as follows and works as expected:

    insertDays: function() {
      ...
    }.observes('startDate', 'doctor.appointments.isLoaded')
    

    Elsewhere in the program I was able to use the following code to ascertain whether the data had loaded:

    var isLoaded = appointments.get('isLoaded');
    

    Thanks to @Unspecified for steering me in the right direction. Cheers!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Ember.Mixin which observes one of its properties (here bar.baz ). I've
I have an API which can't suitable for Ember-Data's Rest Adapter. There about 3
I have an array of Ember.Object s which is displayed by Handlebars {{#each}} helper
I am new to Ember.js. I have the following experiment in my HTML: <p>Username:
I try to have some inheritance with attributeBindings between two View. (function(exports) { Ember.MobileBaseView
I have an Excel plugin which pipes realtime data into my Excel application. What
What I have: A swf exports a function via ExternalInterface Javascript creates new embed
If I have the following: var ObjectA = Ember.Object.extend({ init: function() { this._super(); document.write('init
Ember.View has a nice method called .appendTo(#container) which would allow me to specify a
Is it possible to use underscore's groupBy function with ember.js? I have the following

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.