cancel
Showing results for 
Search instead for 
Did you mean: 

Temporary contents during initial load

bjorn-henrik_zink
Active Participant
0 Kudos

Hi,


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"

  }).placeAt("content");

});



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?


Thanks!

Accepted Solutions (0)

Answers (1)

Answers (1)

bjorn-henrik_zink
Active Participant
0 Kudos

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