149
AngularJS ng-list Directive
The ng-list directive is used to convert a string into an array of string, using a comma as the default separator. You can also convert an array of string and display the input field as a string by putting the ng-list directive on the input field.
The value of the ng-list attribute defines the separator.
Syntax:
Parameter explanation:
separator: It is an optional directive. It defines the separator. Its default value is a comma “,”
Let’s take an example to demonstrate the usage of ng-list directive.
See this example:
For example: If you write the name in the format Ram,Shyam,Mohan then you will get the result in the following form:
Next TopicAngularJS ng-open Directive