title: Angular http.post by ID to update current record
body: <p>I have a successful HTTPGET, HTTPDELETE, HTTPPUT(add new record), and HTTPPOST(UPDATE) that works well in postman. I have also implemented the get, delete and put into my angular model, but can't seem to wrap my head around the httppost. I have a html page with fields, fields and more fields. Inputs, selects and dates. </p>
  
  <p>My working put angular controller look like below:</p>
  
  <pre><code>vm.addComplaint = function () {
          vm.errorMessage = "";
          vm.isBusy = true;
  
          $http.put(baseURL + "api/comp", vm.newComplaint)
          .then(function (response) {
              vm.complaints.push(response.data);
  
              vm.newComplaint = {};
          }
          , function (error) {
              //error
              vm.errorMessage = "Failed to save new trip" + error;
          })
          .finally(function () {
              vm.isBusy = false;
          })
      };
  </code></pre>
  
  <p><strong>Question</strong>
  How do I write my angular controller to perform a post like it does in postman and do I need to pass in the fields for it to work?</p>
  
  <pre><code>$http.post(baseURL+ "api/comp/" + Id).success(function(data){
   alert("Updated Successfully!")
  //how do  save data here
  }).error(function (data) {
              $scope.error = "An Error has occurred while Saving Customer! " + data;
              $scope.loading = false;
          });
  </code></pre>