I would have thought that the LoadingRoute
would display its template in the {{outlet}}
of the main AppView, but it doesn\'t seem like it does. Wha
Indeed it looks that it is inserted right before the closing tag of the tag with class ember-application
. You can control to which outlet
it is inserted using renderTemplate:
App.LoadingRoute = Ember.Route.extend({
renderTemplate: function() {
this.render('loading', {
outlet: 'loading',
into: 'application'
});
}
});
Then place the loading
outlet wherever you want in the application
template:
Note that the name of the default outlet (i.e., {{outlet}}
) is main
. But trying to use the default outlet
for rendering the App.LoadingView
creates problems.
Demo: http://jsbin.com/asizim/2/