I have the following problem, I hope you can help me.
I have a while loop and inside I am calling a service, the problem is that the loop runs many times and never enters the service, blocks the browser and does not enter the service, if I remove the while if it enters. You know what I'm missing?
while (termina === false) {
HorasExtrasService.ValidaDia(vm.detalle.HeFecha)
.then(function (data) {
if (data !== '' && moment(vm.detalle.HeFecha, 'YYYY-MM-DD').day() === 0) {
domingo = 'S';
}
That is a part of the code, I do not hit everything because it is mut long, the fact is that it does not come to call the service, I greatly appreciate help or guidance in this process.