title: how to create object while using ng-repeat and array in angularjs
body: <p><strong>Hello Everyone</strong> I have face a problem to create a object with ng-repeat. when i declare the Object then the same value in filled in the text box which has same ng-model value. if i am not Declare the object then duplicacy is not occures. 
  If i am declare the $scope.user = {}; in js file then problem is occures. please check this. Give me a solution ASAP. </p>
  
  <p><strong>My Fiddle Link Please Check This</strong>  <a href="http://jsfiddle.net/Ladjkp5s/1/" rel="nofollow">http://jsfiddle.net/Ladjkp5s/1/</a></p>
  
  <p><strong>Here is my Html file</strong></p>
  
  <pre><code>&lt;div ng-app="myApp"&gt;
    &lt;div ng-controller='MainController' ng-init="start = 0; end = 5;"&gt;
       Start: &lt;input ng-model="start"&gt; End: &lt;input ng-model="end"&gt;
       &lt;ul&gt;
         &lt;li ng-repeat="item in items | slice:start:end"&gt;{{item + 1}}
            &lt;div&gt;
             Name: &lt;input type="text" ng-model="user.name"&gt;&lt;br&gt;
             Address:  &lt;input type="text" ng-model="user.add"&gt;&lt;br&gt;
             Phone:  &lt;input type="text" ng-model="user.phn"&gt;&lt;br&gt;
             ZipCode:  &lt;input type="text" ng-model="user.zip"&gt;
           &lt;/div&gt;
         &lt;/li&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Here is my JS File</strong></p>
  
  <pre><code>var app = angular.module('myApp', []);
  app.filter('slice', function() {
     return function(arr, start, end) {
     return arr.slice(start, end);
    };
  });
  app.controller('MainController', function($scope) {
   $scope.items = [];
    $scope.user ={};
     for (var i = 0; i &lt; 5; i++) $scope.items.push(i);
  });
  </code></pre>
  
  <p>Thanks.</p>