In this example we have textarea to enter the names of the persons. Write comma seprated names in the textarea and the ng-pluralize directive will show about the entered names that these persons are viewing.

<!DOCTYPE html> <html xmlns=""> <head> <title>Welcome to LearnKode - A code learning platform</title> <script src=""></script> <link rel="stylesheet" href=""> </head> <body ng-app="pluralizeExample"> <div ng-controller="ExampleController"> <div class="container"> <div class="col-md-3"> <p>Type in a list of comma ( , ) separated names.</p> <textarea class="form-control" ng-model="people" ng-list=","></textarea> <pre>{{people|json}}</pre> <ng-pluralize count="people.length" offset="2" when="{ '0': 'Nobody is viewing.', '1': '{{people[0]}} is viewing.', '2': '{{people[0]}} and {{people[1]}} are viewing.', 'one': '{{people[0]}}, {{people[1]}} and one other person is viewing.', 'other': '{{people[0]}}, {{people[1]}} and {} other people are viewing.'}"> </ng-pluralize> </div> </div> </div> <script> var app = angular.module("pluralizeExample", []); app.controller('ExampleController', ['$scope', function ($scope) { $scope.people = []; }]); </script> </body> </html>