title: Saving JSON data to server using AngularJS - disappears on page refresh
body: <p>I'm writing a single-page web app using AngularJS. It includes a table containing data pulled from a JSON file sitting on a server. I am using the <code>$http</code> service to make a <code>$http.get()</code> call to fill the table from this file. </p>
  
  <p>Also on the page is a form used to add data to the table. I am using <code>$http.post()</code> to add data from the form to the JSON file (which seemingly works fine because my <code>.success()</code> callback runs after the post call is made).</p>
  
  <p>However, whenever I refresh the page, I find that the data I supposedly posted is not represented in the table. Is a <code>$http</code> request not enough to save data to a file permanently?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>My <code>$http.post()</code> does NOT work correctly. My JSON file never gets updated after the post request. Not sure why. See below code:</p>
  
  <pre><code>$scope.postNewJob = function(newJob) {
      $http.post('json/jobList.json', newJob)
          .success(function(data) {
              console.log(data);
  
          })
          .error(function(data,status,error,config) {
              alert("Error: "+error+" Post to server failed.\nStatus: "+status);
          });
  };
  </code></pre>