I have 6 'page' objects held in an 'pages' ArrayProxy object.
I have a StateManager instance that will regulate the 6 views corresponding to these 6 'page' objects.
App.stateManager = Ember.StateManager.create({
rootElement: '.tab-content',
initialState: 'firstTab',
firstTab: Ember.ViewState.create({
view: Ember.View.extend({
templateName: 'first',
contentBinding: 'App.tempObject'// binding to a regular Ember Object works.
})
}),
secondTab: Ember.ViewState.create({
view: Ember.View.extend({
templateName: 'second',
contentBinding: 'WHAT GOES HERE?'//how to bind to an object in an array
})
})
The problem is that it is not clear how to bind a view to a particular object in an ArrayController.
I have a jsFiddle illustrating the problem here: http://jsfiddle.net/lifeinafolder/xUNUN/
For illustration purposes, the jsFiddle only has 2 states instead of all 6.
A similar problem is shown here: Ember.js binding models stored within an array. The solution is not very clear though.