title: Is it possible to write data to a locally json file with nothing but angular?
body: <p>I'm trying to write data to a json file after hitting "Submit" on an html formly-form using only angular, but nothing is happening. I know I can read a json file using angular but not sure on creating files.
  onSubmit() in controller:</p>
  
  <pre><code>function onSubmit() {
      $scope.save = function() {
          $http.post('./temp/sample_data.json', JSON.stringify($scope.model)).then(function(data) {
              $scope.msg = 'Data saved';
          });
      };
  };
  </code></pre>
  
  <p>html:</p>
  
  <pre><code>&lt;form name="form" ng-submit="onSubmit()" novalidate&gt;
      &lt;formly-form model="model" fields="fields"&gt;&lt;/formly-form&gt;&lt;br/&gt;
      &lt;button type="submit"&gt;Submit&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>The sample_data.json isn't created and if I create an empty file it does not fill up with the data as well. The $scope.model defenitly contains data. 
  If anyone can help, it will be very appreciated.
  Thanks, Alon.</p>