Hi there,
i am new to ember. I am still experimenting on it.
I have very simple issue which i cant solve by using ember.
Basicly the trouble is i have a list of title when i click on one them it converts the text into input so that user can edit.
However since its a list of title i want to disable the other items isediting property to false…
Anyway less talk show me the code part
{{#each query in model itemController='query'}}
<tr>
{{#if query.isEditing}}
<td>{{input value=query.query}}</td>
{{else}}
<td {{action 'editTitle' this}}>{{query.query}}</td>
{{/if}}
</tr>
{{/each}}
App.QueriesController = Ember.ArrayController.extend({
itemController: 'query',
});
App.QueryController = Ember.ObjectController.extend({
isEditing: false,
actions: {
editTitle: function (item) {
this.set('isEditing', true);
}
}
});