Skip to content
This repository has been archived by the owner on May 26, 2019. It is now read-only.

Commit

Permalink
Auto merge of #1357 - anilmaurya:loading-states, r=toddjordan
Browse files Browse the repository at this point in the history
Improve loading states docs

#1352
  • Loading branch information
homu committed Apr 6, 2016
2 parents ba94efa + bfd84c3 commit 7fd63da
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions source/localizable/routing/loading-and-error-substates.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,28 @@ Router.map(function() {
});
```

Ember will alternate trying to find a `routeName-loading` or `loading` template
in the hierarchy starting with `foo.bar.slow-model-loading`:
When accessing `foo.bar.slow-model` route then Ember will alternate trying to
find a `routeName-loading` or `loading` template in the hierarchy starting with
`foo.bar.slow-model-loading`:

1. `foo.bar.slow-model-loading`
2. `foo.bar.loading` or `foo.bar-loading`
3. `foo.loading` or `foo-loading`
4. `loading` or `application-loading`

It's important to note that for `slow-model` itself Ember will not try to find
a `slow-model.loading` template but for the rest of the hierarchy either
It's important to note that for `slow-model` itself, Ember will not try to
find a `slow-model.loading` template but for the rest of the hierarchy either
syntax is acceptable. This can be useful for creating a custom loading screen
for a leaf route like `slow-model`.

When accessing `foo.bar` route then Ember will search for:

1. `foo.bar-loading`
2. `foo.loading` or `foo-loading`
3. `loading` or `application-loading`

It's important to note that `foo.bar.loading` is not considered now.

### The `loading` event

If the various `beforeModel`/`model`/`afterModel` hooks
Expand Down

0 comments on commit 7fd63da

Please sign in to comment.