You could create a custom filter for this task:
JavaScript:
myApp.filter('arrayToString', function() {
return function(inputArray) {
return inputArray.join("\n");
};
});
And in your HTML:
<div ng-repeat="record in list">
<textarea>{{record.outputs | arrayToString}}</textarea>
</div>
Notes:
- This you do not use
ng-model
anymore you need track changes by yourself and reverse the whole input,ng-change
orng-form
should be helpful. - Make sure you filter is a dependency of you app.