반응형
anguler
$q.all([list1, list2]).then(function (result) {
let insert = insert();
$q.all([insert]).then(function (result) {
$q.all([list3,list4]).then(function (result) {
$scope.vm.openScheduleDialog(ev, item);
});
});
});
let list1 = $http.get(contextPath + "/api/cms/list1").then(function (result) {
$scope.vm.layouts = result.data.data;
}, function (result) {
$scope.vm.layouts = null;
$state.go('app.pages_auth_login');
});
let list2 = $http.get(contextPath + "/api/cms/list2").then(function (result) {
let templates = result.data.data;
$scope.vm.templateMap = new Map(templates.map(t => [t.templateId, t]));
}, function (result) {
$scope.vm.templateMap = null;
$state.go('app.pages_auth_login');
});
react
const getFileUrls = () => {
return new Promise((resolve, reject) => {
{ /* 파일 업로드 */ }
const formData = new FormData();
formData.append("file", fileArr);
formData.append("extraPath", "review");
uploadImage(formData).then((res) => {
resolve(res.data);
});
})
}
/*
@Description: uplaod
*/
const upload = async () => {
const data = await getFileUrls();
}
반응형
'자바스크립트' 카테고리의 다른 글
자바스크립트 날짜 차이 계산 (0) | 2022.11.10 |
---|---|
javascript json 데이터 추가/변경 (0) | 2022.08.30 |
자바스크립트 리스트 sort 정렬 (0) | 2021.06.09 |
현재스크롤 위치,스크롤 퍼센트, 스크롤 10%당 실행 (0) | 2021.01.28 |
자바스크립트 속성추가 ,속성변경,속성삭제 (0) | 2021.01.14 |
댓글