1👍
Iam not sure if it’s somewhere in your example or just something you do wrong elsewhere.
Down below is a working example of a POST in angular.
var config = {
method: 'POST',
url: '/api/studentplannedcredit/',
data: variablesToSend
};
$http(config)
.success(function(data, status, headers, config) {
console.log(data);
})
.error(function(data, status, headers, config) {
console.log(data);
});
PS: Dont POST for each loop.. that will hammer the API badly.. collect the data first and then send 1 POST only.
0👍
I am assuming, $modalInstance is the issue here.
Try to run without
$modalInstance.close();
- [Answer]-Is it good idea to write unittests, which will check whether important templates are in right place?
- [Answer]-Error during template rendering
- [Answer]-Having trouble solving a Django test for page content
- [Answer]-.pyc files don't get updated (only in Django)
- [Answer]-Django continually checking database for new information
Source:stackexchange.com