This is my array where I store my pushed data, now I want to send this data to server using http post method.
$scope.workingSchedules = [{
workingDay: 'MONDAY',
workingHours: [{
fromTime: '1222' ,
toTime: '1400'
}]
}];
This is my code to push data into array.
$scope.addRow = function(){
$scope.workingSchedules.push({
'workingDay':'MONDAY',
'workingHours':[{
'fromTime':$scope.fromTime,
'toTime':$scope.toTime
}]
});
$scope.fromTime='';
$scope.toTime='';
$scope.workingDay='';
};
How am I suppose to send this array using normal
$http.post($scope.API_url,
workingSchedules, config)
.success(function(workingSchedules, status) {