Javatpoint Logo
Javatpoint Logo

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.


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:

Test it Now

For example: If you write the name in the format Ram,Shyam,Mohan then you will get the result in the following form:

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA