This question shows how to get properties of parent views.
Is there a way to achieve the same with general Ember.Object
s. For example how does the child
access properties of App.Parent
:
App.Parent = Ember.Object.extend({
parentProperty: 'someValue',
child: App.Child.create()
});
App.Child = Ember.Object.extend({
init: function(){
// I don't know which is my parent object
// but I still want to access the value of `parentProperty`
// var parentProperty = ???
}
});