I want add data to the existing model post submitting the data, below is the code
HTML Code
<input type="text" ng-model="configData.A1" />
<input type="text" ng-model="configData.A2" />
<input type="text" ng-model="configData.A3" />
<input type="text" ng-model="configData.A4" />
<button class="btn" ng-click="saveData(configData)">Save Data</button>
Angular js code
$scope.saveData = function (configData) {
//Want to add below commented data into existing configData
//configData.uniqueId = $scope.config.uid;
//configData.uniqueName = $scope.config.uName;
$http.post(saveConfigData_api, configData).then(function (data) {
$('#progressbar').hide();
});
};
$scopeto make changes to your model object