funciton validateForms(formRefs) {
const formValidatList[];
for (let i = 0; i < formRefs.length; i++) {
const formValidat = new Promise((resolve, reject) => {
let formRef = formRefs[i];
if (formRef.length) formRef = formRef[0];
formRef.validate((valid: any) => {
if (valid) {
resolve(ture);
} else {
reject(false);
}
});
});
formValidatList.push(formValidat);
}
return Promise.all(formValidatList);
}
validateForms(arr).then( result =>{
log('success');
})