Ng-List-6

 

Ng-list directive display the textbox text in json format.Textbox value bind to list variable which will display the text. It will not trim the input.

 
 
 
<!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="app"> <div ng-controller="controllerName"> <p>Type space (' ') separated names.</p><input type="text" ng-model="list" ng-list=" " ng-trim="false"><br /> <pre>{{list|json}}</pre> </div> <script> var app = angular.module("app", []); app.controller('controllerName', ['$scope', function ($scope) { $scope.list = ["Learn", "It"]; }]); </script> </body> </html>
Output