Skip to Content

Temporary contents during initial load


the initial load of my UI5 application takes a couple of seconds on older smartphones. During the loading time, I would like to present some intermediate contents. It is pretty simple to get stuff on the index.html page by using the sap.ui.getCore().attachInit(...) method. For example:

sap.ui.getCore().attachInit(function () {
  new sap.m.Text({
            text: "Hello World"

sap.ui.getCore().attachInit(function () { sap.ui.require([ "zink/model/mockserver", "sap/m/Shell", "sap/ui/core/ComponentContainer" ], function (mockserver, Shell, ComponentContainer) { mockserver.init(); new Shell({ app: new ComponentContainer({ name: "zink", height: "100%" }) }).placeAt("content"); }); });

Problem is, that the intermediate part remains on the page even after the contents of my application has been loaded and displayed. I would like to remove the intermediate contents once the real contents is loaded. Any suggestions how I can achieve that?


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Apr 25, 2016 at 12:14 PM

    So far, I have found one very simple solution of using <DIV> and the visibility attribute. Furthermore, I believe this blog Asynchronous load of SAPUI5 could be another option. Any other suggestions?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.