Let's say I have two controllers: CompaniesController and IndexController . It turns out that all the data needed for my Index route comes from CompaniesController . So, I indicated my IndexController as follows:
App.IndexController = Ember.ArrayController.extend({ needs: 'companies', });
This works well if CompaniesController already initialized, but what about the first visit to the site? CompaniesController empty.
So, I need to initialize the data for CompaniesController from IndexController . How to do it?
source share