Hello!
I was hoping someone could help me get straight in my mind when I should be treating an ObjectController
as a proxy, or going directly to the model.
I have a model Post
that hasMany
Comments
.
In the PostController
, should it be:
Ember.ObjectController.extend({
someFunction: function() {
var comments = this.get('model.comments');
// .......
}.property('model.comments.[]')
})
or
Ember.ObjectController.extend({
someFunction: function() {
var comments = this.get('comments');
// .......
}.property('comments.[]')
})
Is there a difference? Why would you use one over the other?