What is the ‘correct’ way to bind from one model to another when the models are stored within an array? Typically I’d imagine that this would be a Controller’s content array, but to keep the example simple:
MyApp.websites = [];
MyApp.websites.push(Ember.Object.create({
name: "Stackoverflow"
}));
MyApp.websites.push(Ember.Object.create({
name: "Serverfault"
}));
MyApp.favorite = Ember.Object.create({
// how should this be bound to a specific element of MyApp.websites?
nameBinding: ?????????
});
You can use a property to bind that.
This way:
This is just to demonstrate the idea, a better implementation would be: