Application Error/Loading routes


#1

When a model hook rejects, Ember nicely transitions to the error template for that particular route.

This works fine, and I’ve been using it for years.

For the first time, I’ve had to return something from the application’s model hook.

I was expecting the loading and error templates to behave the same, but I can’t get them to work.

Simply rejecting from the application’s model hook results in a whilst screen of death, and doesn’t transition to the error route like I would expect.

I’ve set up a super simple Twiddle, if anybody could enlighten me that would be great.

https://ember-twiddle.com/bb15ad9b4d19eb4e8257a054b69b31fd?openFiles=routes.application.js%2C


#2

Try renaming the template to application-error.


#3

Yep, thanks I got that in the end. Although couldn’t get application-loading.hbs to work, but that’s ok I don’t really need that. Ty.