Ember pod structure and loading substate


#1

From what I gather the correct setup for loading and error susbstates when using pod structure is:

…/app/pods/mypath/template.hbs …/app/pods/mypath/route.js …/app/pods/mypath/loading/template.hbs

This does not show the loading template however when I navigate to /mypath. (I have setup a delay in route.js/beforeModel to test)

When I navigate to /mypath/loading/ however it will show the loading template.

Ember version: 1.13.6 Ember CLI: 1.13.1


#2

Figured it out. Substates for the application route go directly in the root of the pod structure. So /pods/loading /pods/error, etc. Substates for subroutes go in their respective directories. /pods/mypath/loading, etc.


#3

This is ancient, but the first result for ember pods loading substate so I figured I’d add an update. We use pods but don’t have a /pods/ directory. The only way I have gotten subroutes to work with our setup is like this (https://ember-twiddle.com/7e30e004f8dd67c26510f687abed6691?openFiles=index-loading.template.hbs%2C):

index/
   index.hbs
index-loading/
   index.hbs