isLoading component waiting on API request to finish?


I’m trying to let the user know that the request is still waiting to be completed. I’m requesting data from an API like this:

<object data="{{}}&user_id={{}}&contractf_ids={{selectedContracts}}&token={{token}}#view=FitH"></object>

However, this could take a while to load. I want to somehow let the user know that it’s still loading until the request is completed.

This is similar to what I want to do:

{{#if isLoading}}
  {{partial "partials/loading"}}
  <div class="pdf-iframe">
      <object data="{{}}&user_id={{}}&contractf_ids={{selectedContracts}}&token={{token}}#view=FitH"></object>

Does anybody have any idea on how I would do this?? Thank you!


<object onload={{action "hideLoadingScreen"}}

You should be able to use the onload event to invoke an action. Although I haven’t tried it with the object tag yet.

Let me know if this helps!



Ah thank you! :slight_smile: I will definitely give this a shot!


@hschillig this is not exactly the same, but you could probably adapt some of the ideas in this article to what you’re trying to do.