there is already a couple of questions asking for similar thing, but none of the answers works for me so far. I have following code, where I want to access model from UsersController in DashboardController:
JP.DashboardController = Ember.ArrayController.extend({
needs: ['users']
});
JP.UsersController = Ember.ArrayController.extend({
model: function(){
return JP.User.find();
},
sortProperties: ['id']
});
My dashboard.template looks like this:
<div class="row-fluid">
<div class="span2">
{{#if controllers.users.isLoaded}}
{{#each user in controllers.users }}
{{user.name}}
{{/each}}
{{else}}
Users not loaded
{{/if}}
</div>
<div class="span10">
{{ outlet }}
</div>
</div>
Why are users never loaded? What is wrong with my code? Thanks