Currently I am using the code below, and it is working fine. But I want to remove the if statements.
$scope.setValue = function (dataPut,dataRecive) {
if(dataPut=='profData')
$scope.formData.profData=dataRecive;
else if(dataPut=='cartData')
$scope.formData.cartData=dataRecive;
else if(dataPut=='buyflowData')
$scope.formData.buyflowData=dataRecive;
}