I have a computed property that listens to a model and looks something like:
groups: function() {
let g = this.get('model.items.groups').map(function(obj) { return obj.group; });
return g.join(',');
}.property('model.items.groups'),
In my template, I have the following input field:
{{input value=groups type="text" class="form-control" placeholder="Testme"}}
I noticed that after providing input through the UI, the value within Ember inspector for groups
becomes a string and no longer a computed property. How do I avoid this in Ember 2.1 and have it merely update the computed property?
Aucun commentaire:
Enregistrer un commentaire