1
votes

What is the ember-cli way of displaying a static message to indicate that the emper-app itself (vendor.js) is loading (being downloaded)?

Current situation

  • Index.html is blank pre vendor.js download

Goal

  • Display something to the user while vendor.js is downloading to avoid making them leave the page while its loading.

Solution idea (not yet tested, not yet known if it's a good solution)

  1. Create a named div in the index.html file
  2. Hide it on ember initialization
1
create an initializer that runs once all other initializers have ran?user156888
yeah, that would be a way to implement the solution idea. Any nice way of making an initializer once the others have run btw?consideRatio
you can set before and after so I guess you can have a pop there - no guarantees it will run before all the 3rd party initializers have ran but i'd start thereuser156888
Seems I need to name all the other initializers to accomplish that. I resorted to invoking the "hide the div" code in my applicationroutes renderTemplate before calling this._superconsideRatio

1 Answers

1
votes

Have you tried "loading" route in ember? You can place any template you want to display during loading into "app/routes/loading.hbs". If you are using pods, place it into "app/pods/loading/template.hbs". If you want more detailed instructions, see: http://emberjs.com/guides/routing/loading-and-error-substates/