Im wondering here, how to show models data e.g Organization model>name field in ember view I tried something like this.
organization VIEW
OrganizationComputedProperty: function(){
console.log("this is org OrganizationComputedProperty");
var org = {
orgname: this.get('controller.organizations')
};
}.property('orgname'),
Model
var Organization = DS.Model.extend({
name: DS.attr('string'),
address: DS.belongsTo('agents/address')
});
// Initial data for Organization model, only applies when using
Organization.FIXTURES = [
{
id: 1,
name: 'TU',
address: 1,
},
{
id: 2,
name: 'TLU',
address: 2,
}
];
Main hbs
{{#each personFormCount}}
{{view 'organization'}}
{{/each}}
Controller
personFormCount: [{id: 1}, {id: 2}]
But i know that’s wrong, because they watch for changing behaviours which don’t take place in model…
Cheers,