Ng-List-2

 

Ng-list directive display the textbox text in json format seprated by comma.Textbox value bind to name variable which will display the text.

 
 
 
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.2/angular.min.js"></script> </head> <body ng-app> <div> <p>Type comma ( , ) separated names.</p> <textarea ng-model="name" ng-list=","></textarea> <pre>{{name|json}}</pre> </div> </body> </html>
Output