I have been working on Ember for about a month now but I am still confused about the various hooks in Ember. I know bits and pieces of everything but can't stitch them together. I understand the usage of model, beforeModel and afterModel hooks. What is setupController hook used for and when is it called in the lifecycle. Also what is renderTemplate hook used for. I have been using it to execute functionality that should be carried out everytime the template is rendered but after reading online, I found out that it is used when one wants to render another template in an outlet like:
renderTemplate: function() {
this.render('favoritePost');
}
If I define the both the model hook and the renderTemplate hook in the route, I start getting errors and nothing works after that. Where can I do things that should be done every time a template is loaded. I know I can do a similar thing using didInsertElement hook for a view but can't I do it without creating a view?