1) I have a input field as follows
<label>Size:</label>
<input type="text" ng-model="data.Size" ng-init="data.Size='10000000'" />
<label>Number:</label>
<input type="text" ng-model="data.Number" ng-init="data.Number='10'" />
As you can see, the size and number have been initialized with ng-init.
2) Now i have a ajax call to server posting this input parameters
var submitData = "=" + JSON.stringify(data);
$.ajax({
type: "POST",
url: serviceURL2,
data: submitData
}).then(function (response) {
console.log(response.Info);
});
The response of this ajax function contains new values for Size and Number input field. console to response.Info gives this output in object form as shown below.
[Object]
0: Object
size:10000
number:5
Now, i need to pass this values to the input fields so that the values reflect the new values which we get by calling ajax call as shown above.
can someone please let me know how to bind these two and display it to the user