AngularJS ng-list Instruction
AngularJS Examples
Convert the user's input into an array:
<
div
ng-app=
""
<
input
ng-model=
"customers"
ng-list/
<
pre
{{customers}}
<
/preTry it »
Definition and Usage
ng-list The directive converts a string into an array, separated by commas.
ng-list The directive also has another conversion method. If you have a string array you want to display in an input field, you can use on the input ng-list directives.
ng-list The attribute value defines the separator.
Syntax
<
element
ng-list=
"separator"
<
/element,
Parameter value
| Value | Description |
|---|---|
| separator | Optional, defines the separator, default is **"**, "**** |
AngularJS Reference Manual