Hello,
Is there a way to bind value by key? This is the simplified model I have which I’m fetching with Ember Data:
{
id: 1,
name: 'page_1',
content: [{
name: 'title',
value: {
en: 'Home page',
de: 'Startseite'
}
}]
}
Now I want to be able to do something like:
{{#each model.content as |field|}}
<label>{{field.name}}: {{input type="text" value=field.value[language]}}</label>
{{/each}}
I tried using a custom Handlebars subexpression like so:
{{input type="text" value=(multilingual-value field.value language)}}
But the problem is when the value changes the original model is not updated. Any help is highly appreciated. It is funny how I have built a few mid-sized Ember apps in the past and now I can’t get my head over this…