0
votes

I am using Ember data. I have a template, loading.hbs in my /templates directory.

My route for users looks like this:

renderTemplate: function(controller, model) {
    this.render();

    this.render('settings.users.users', 
    { 
            outlet: 'users', 
            into: 'settings.users.index',
            model: this.store.find('user')
    });
} 

I am testing this by putting a long sleep in my server code. I would expect the loading template to be rendered into settings.users.users but it's not.

1
What is the behavior you are currently experiencing? The template remains blank until the call from the server returns? - Oren Hizkiya
Yes, the the main template renders, however the template being rendered into the child outlets (users) is blank until the service returns. - Sam

1 Answers

0
votes

Since you have loading.hbs directly in your templates directory, you are saying that's the template that should be used when your application route is loading.

If you want this to be for a nested route, you need to nest it in your template directory appropriately (/templates/settings/users/loading.hbs, or something along those lines depending on the structure of your router).