Hy, so I have this code :
Hy,所以我有这个代码:
angular.forEach(parentsId, function(parentId, key) {
$scope.getContentByParent("Courses",parentId,function(data){
$scope.Courses.push(data);
});
});
$scope.getContentByParent = function(table,parentId,callback) {
var data = new FormData();
data.append('table', table);
data.append('parentId', parentId);
$http.post('../server/Model/content/get_content_by_parent.php', data, {
transformRequest: angular.identity,
headers: {'Content-Type': undefined}
})
.then(function (data) {
data = data.data;
callback(data);
});
};
a