AngularJS ng-list command
AngularJS examples
Convert user input as an array:
<Div ng-app = "" >
<Input ng-model = "customers " ng-list />
<Pre> {{customers}} </ pre>
<Input ng-model = "customers " ng-list />
<Pre> {{customers}} </ pre>
try it"
Definition and Usage
ng-list command to convert a string array, separated by commas.
ng-list command there is another method of conversion, if you want to have an array of strings in the input box is displayed, you can use ng-listcommand on the input.
ng-list
attribute value defines the separator.
grammar
<Element ng-list = "separator "> </ element>
<Input>, <select>, <textarea>, and other editable elements support this instruction.
Parameter Value
value | description |
---|---|
separator | Alternatively, custom delimited, the default is"," |