AngularJS ng-list
Directive
AngularJS Example
Convert user input into an array:
Definition and Usage
The ng-list directive converts a string into an array, using commas as separators.
The ng-list directive also provides an alternative conversion method. If you have a string array that you want to display in an input box, you can use the ng-list directive on the input.
The ng-list
attribute value defines the separator.
Syntax
<input>, <select>, <textarea>, and other editable elements support this directive.
Parameter Values
Value | Description |
---|---|
separator | Optional, defines the separator, default is ", " |