I found an old jsfiddle where someone uses a regex pattern for the delimiter from ng-list http://jsfiddle.net/MrSteve/tnY6m/1/ .
ng-list
I tried this in Angular 1.3.x and can't get it to work.
Is there a way to accept multiple delimiters with ng-list, so I can split by ,or ;?
,
;
This fiddle seems to be your solution:http://jsfiddle.net/MrSteve/tnY6m/1/
You should change your regex to: /[,;]/
/[,;]/
- , , angular . , , $watch , .
, . .
<textarea ng-model="names" rows="4" width="100%"></textarea>
$scope.$watch('names', function() { var re = /[,\s]/g; $scope.emails = $scope.names.split(re) });