I have a simple textarea control,
<div ng-controller="TodoCtrl">
<textarea ng-model="myArray"></textarea>
</div>
and a model that is an array of strings:
function TodoCtrl($scope) {
$scope.myArray = [
"something1",
"something2",
"something3",
];
}
Im trying to get it so that every entry is on its own line:
something1
something2
something3
And for extra credit would like to resplit the text back into an array on hte model side.
I've tried a few things, including ng-list, custom directives, custom filters, and ng-repeat, but haven't gotten any where.
fiddle Example: