For ng-list, you'd normally have a simple array for your model:
[1,2,3,4,5]
Instead, I have an array of objects like such:
[{ id: 1, value: 2 }, { id: 2, value: 3 } ... ]
Is there any way for me to be able to output each value
in a text input similar to this?:
2, 3
Seemingly ng-list is what I want, but obviously my model is wrong. Will I just have to translate my model or is there a way to do this with what I have?
Thanks!
Expanding on @Benjamin Gruenbaum comment which i think is the simplest solution:
<input type="text" ng-model="test">
and in your controller
$scope.test = [{ id: 1, value: 2 }, { id: 2, value: 3 } ].map(function(x){ return x.value; });