title: How to update ng-repeat values in angular js?
body: <p>I am new to angular js, I have an array I am looping it through <code>ng-repeat</code> directive, and I have written code for copy, remove, and edit values in the array.</p>
  
  <p>If I want to remove or copy I can do it, done?
  But if I click on edit one popup box will appear there I want to edit the values those updated values should update in the array.</p>
  
  <p>How can I get it done?</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html&gt;
  &lt;head&gt;
   &lt;title&gt;Angular app&lt;/title&gt;
    &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.17/angular.min.js"&gt;
    &lt;/script&gt;
    &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"&gt;&lt;/script&gt;
  &lt;style type="text/css"&gt;
    .listv{
       margin-bottom: 30px;
    }
    .editpopup{
       width: 250px;
       height: 250px;
       border: 1px solid black;
       display: none;
       position: absolute;
       top: 0px;
       left: 0px;
       bottom: 0px;
       right: 0px;
  
       background-color:gray;
    }
    .editpopup-true{
       display: block;
    }
    .editpopup-false{
       display: none;
    }
    &lt;/style&gt;
  &lt;/head&gt;
   &lt;body ng-app="myApp"&gt;
      &lt;div ng-controller="myCon"&gt;
       &lt;div ng-repeat="s in items" class="listv"&gt;
          &lt;span&gt;{{s.id}}&lt;/span&gt;
          &lt;span&gt;{{s.pname}}&lt;/span&gt;
          &lt;button ng-click="removeStudent($index)"&gt;remove&lt;/button&gt;
          &lt;button ng-click="copyrow($index)"&gt;copy&lt;/button&gt;
          &lt;button ng-click="editrow($index)"&gt;edit&lt;/button&gt;
       &lt;/div&gt;&lt;/br&gt;
  
       &lt;div class="editpopup editpopup-{{istrue}} "&gt;
          &lt;p&gt;edit id:&lt;input type="text" ng-model="editedid"&gt;&lt;/p&gt;
          &lt;p&gt;edit pname:&lt;input type="text" ng-model="editedname"&gt;&lt;/p&gt;
          &lt;button ng-click="save($index)"&gt;save&lt;/button&gt;
          &lt;button ng-click="closepopup()"&gt;cancel&lt;/button&gt;
       &lt;/div&gt;
  
    &lt;/div&gt;            
  </code></pre>
  
  <p>
       </p>
  
  <pre><code>      var myApp=angular.module('myApp',[]);
        myApp.controller('myCon',function($scope){
        $scope.items=[{id:1,pname:'box1'},{id:2,pname:'box2'}, {id:3,pname:'box3'}];
  
      $scope.removeStudent=function($index){
        $scope.items.splice($index,1);
      }
    $scope.copyrow=function($index){
  
       $scope.len=$scope.items.length;
       $scope.ids=$scope.items[$index].id;
       $scope.pnames=$scope.items[$index].pname
  
       $scope.items.push({
            id:$scope.len+1,
            pname:$scope.pnames 
        });
    }
    $scope.editrow=function($index){
       $scope.istrue=true;
       $scope.editedid=$scope.items[$index].id;
       $scope.editedname=$scope.items[$index].pname;
    }
    $scope.closepopup=function(){
       $scope.istrue=false;
  
    }
    $scope.save=function($index){
       $scope.istrue=false;
       $scope.s.name=$scope.editedname;
    }
   });
  </code></pre>
  
  <p>
  </p>
  
  <p>here is <a href="http://jsfiddle.net/rgpL5tk7/6/" rel="nofollow noreferrer">jsfiddle</a>  </p>