javascript - Angularjs saving user input data and generate it to a json file -


i pretty new angularjs , web app development. i'm making simple web app. first, reads default settings json file. on web, users able change these settings. however, stuck on how save changes made users , how generate them new json file. don't know should put in controller. tried different methods found online none of them worked. please assist.

app.js - did read file part need save file part.

var app1 = angular.module("myapp", [])     app1.controller("myappctrl", function ($scope, $http) {         $http.get('src/default.json').then(function(response){             $scope.messes = response.data;         });     }); 

logically should work server side processing in situation. write server api (in php, node.js, java etc) accept json, convert json file , stores somewhere , returns downloadable link of physical json file.

so in case:

$http.get('src/default.json').then(function(response){   $scope.messes = response.data;   // perform logic, create json , send server }); 

let server heavy lifting of processing. it's important consider size of json data may affect browser user experience badly.


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -