So I have a text area defined with an ng-list that will separate the elements in an array into their own line.
<textarea data-ng-model="names" data-ng-list=" " data-ng-trim="false"></textarea>
I have a button that will add things to the names array and I want it to show up in the textarea as well.
<button data-ng-click='addPlayer()'>Add</button>
$scope.addPlayer = function() {
$scope.names.push('HODOR' + n++);
}
Unfortunately the textarea will not update when more elements are added to the array, even if they are still stored in the array. Is their anyway I can force that to happen? I tried using $scope.$apply and that didnt work. Here is a plunker showing the error. https://plnkr.co/edit/gaLtvWw3Odhfngrhkitf?p=preview