I have a form that i have created using angular schema form and i have posted it to the server. I now want to take to edit the data i posted. I can get the data like this for isntance
app.controller('FormController', function($scope,$http){
$http.get("data/data.json").then(
function success(response) {
$scope.schema = angular.fromJson(response.data);
},
function error(response) { /* handle error */ });
// do other stuff
});
How do i populate the data i got from the server to the existing forms that i have created?.
How does angular schema form do this?.
Guessing your data. from the $http. you could do this. sorry for the vm. im always use controllerAs.
//Edited i added the functionality of the $http for you example.
HTML
data.json
this is the new plnkr
The key for the edit mode is in your response from the server plus the form and schema, you need to put the vm.model, and remember the model needs to fit whith the schema attributes.