title: ng-model not change after save editing
body: <p>i try to make simple CRUD with angularjs and php api
  the problem is in angularjs</p>
  
  <p>i have code like this :</p>
  
  <pre><code>    $scope.editData = function(pid) {
      $scope.hideform = false;
  
      $scope.edit = false;
      $scope.pid = $scope.projects[pid].pid;
      $scope.title = $scope.projects[pid].title;
      $scope.pcode = $scope.projects[pid].pcode;
      $scope.type = $scope.projects[pid].type;
      $scope.proj_type = $scope.projects[pid].proj_type;
      };
  $scope.saveData = function(pid, title, pcode, type2, proj_type){
          $http.post("api/getProject.php",
              {type: "edit", id:pid, title:title, pcode:pcode, type2:type2, proj_type:proj_type})
              .success(function(data) {
                  notification(data.success, data.message);
                  $scope.hideform = true;
          });
      };
  </code></pre>
  
  <p>and have form for editing data (edit button clicked , then show form edit with ng-model loaded on it</p>
  
  <p>like this</p>
  
  <pre><code>&lt;form class="form-horizontal" ng-hide="hideform" ng-submit="saveData(pid,title, pcode, type, proj_type)"&gt;
  
  &lt;h3 ng-hide="edit"&gt;Edit Project:&lt;/h3&gt;
  &lt;div class="form-group"&gt;
  &lt;label class="col-sm-2 control-label"&gt;PID:&lt;/label&gt;
  &lt;div class="col-sm-10"&gt;
  &lt;input type="text" ng-model="pid" ng-disabled="!edit" placeholder="PID"&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="form-group"&gt;
  &lt;label class="col-sm-2 control-label"&gt;Title:&lt;/label&gt;
  &lt;div class="col-sm-10"&gt;
  &lt;input type="text" ng-model="title" placeholder="Title"&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="form-group"&gt;
  &lt;label class="col-sm-2 control-label"&gt;Pcode:&lt;/label&gt;
  &lt;div class="col-sm-10"&gt;
  &lt;input type="text" ng-model="pcode" placeholder="Pcode"&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;button class="btn btn-success" ng-disabled="error || incomplete"&gt;
  &lt;span class="glyphicon glyphicon-save"&gt;&lt;/span&gt; Save Changes
  &lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>the script are working , but everytime i click save editing then click edit button (on each row on table) , the ng-model on form input still same like the last data what i save but other input are changed , ex : i edited title , when click edit button on different row on the table , just pcode changed to different row data , the Title still same like the last data i edit
  sorry if my explanation make all of you confuse
  Any help will be appreciated </p>
  
  <p>here is the image if my explanation not clear
  <a href="https://i.stack.imgur.com/qNETk.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qNETk.jpg" alt="Image for explanation"></a></p>