<!doctype html>
<html ng-app>
    <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.min.js"></script>
    <script src="script.js"></script>
      ul {

<div ng-controller="Ctrl">
    <li>[<a href ng-click="people.push({})">Add</a>]</li>
    <li ng-repeat="person in people">
      <input ng-model="person.name">
      [<a href ng-click="people.splice($index, 1)">X</a>]
    <li ng-show="people[0]">
      Person 1:<input type="text" ng-model="people[0].name" />
    <li ng-show="people[1]">
      Person 2:<input type="text" ng-model="people[1].name" /><br/>
  Number of People: {{people.length}}<br/>

  <!--- Example with simple pluralization rules for en locale --->
  Without Offset:
  <ng-pluralize count="people.length"
                when="{'0': 'Nobody is viewing.',
                       'one': '1 person is viewing.',
                       'other': '{} people are viewing.'}">

  <!--- Example with offset --->
  With Offset(2):
  <ng-pluralize count="people.length" offset=2
                when="{'0': 'Nobody is viewing.',
                       '1': '{{people[0].name}} is viewing.',
                       '2': '{{people[0].name}} and {{people[1].name}} are viewing.',
                       'one': '{{people[0].name}}, {{people[1].name}} and one other person are viewing.',
                       'other': '{{people[0].name}}, {{people[1].name}} and {} other people are viewing.'}">

function Ctrl($scope) {
  $scope.people = [];