vendredi 6 février 2015

Is it possible to a show loading template for the current route?

In Ember, if I have a routes layout like this:



App.Router.map(function() {
this.resource('home', function() {
this.resource('about');
this.resource('faq');
});


});


Is there any way I can display a loading template for about.loading when a model for the about page takes a while to load. I would also like to show a template for the faq page when that is loading that is different from the `about.


I'm a bit confused about how Ember utilizes the loading route. It seems that it always takes the parent of the route that is slow which seems odd to me when you have routes that are siblings.


Am I misunderstanding the way this works or is there a way I can hack this into doing what I'd like?





Aucun commentaire:

Enregistrer un commentaire