Questions tagged as 'promesas'

2
answers

Promises in angular

I have a problem with asynchronism ... I am trying to create a service in angular that gives me the data of an excel in json. I'm doing this with a library and it works well. my problem is that calling it as a service I leave it within a prom...
asked by 20.10.2018 / 03:58
1
answer

get file in JSON format of request XMLHttpRequest with a JavaScript Promise

I have the following call to an API through a Promise, do I need to get the result of the call in a JSON instead of text, in order to work with it, as it would be possible? thanks! $(document).ready(() => { const c = (x) =>...
asked by 08.09.2018 / 02:32
0
answers

How to pass the result of an angular promise JS to the scope of Angular JS?

I am a beginner with the subject of promises in Javascript. I'm doing an Http query to a laravel method that brings me a little list. When doing the query all ok, it shows me the records in console.log, but when trying to make them available to...
asked by 02.09.2018 / 14:24
0
answers

Promises under Jquery and Ajax

There is a URL where an Order API is hosted. The API provides a method that delivers the order headers for a customer and on a date. What it returns is an order code. There is a second method where, with the order code, it returns the details of...
asked by 21.07.2018 / 16:31
0
answers

mongoose unhandled error in promise

Hello, I would like to know how to do it so that once the update of the duration is over, it will be when I show the updated duration. Recipe.insertMany(recipes) .then(recipes => { console.log('${recipes.length} inserted');...
asked by 27.06.2018 / 14:41
0
answers

Mongoose massive inserts / updates

My application is powered by CSV files, which are parsed to JSON without problems. Once I have the JSON object I start importing let calls = []; for (let i=0; i<json.length; i++) { calls.push(import(json[i]); } Promise.all(calls)...
asked by 16.04.2018 / 12:14
0
answers

refactorization of ajax call using promises

I have a code that requests Ajax using callbacks, the task is to transform it into promises that are linked. So far, I do the two services using $ .when and .done the issue is that this confused about how to sort the parameters that were previou...
asked by 06.04.2018 / 03:16
0
answers

html2canvas jspdf at internetexplorer 11

I have the following problem. I have a button that has to make a screenshot and generate a pdf. I use the html2canvas libraries (to make the screenshot) and the jsPDF library, to convert the image to pdf. In browsers chrome and firefox works wit...
asked by 06.04.2018 / 11:46
1
answer

Test an asynchronous function with jasmine without using setTimeout

I would like if someone can help me to test this function without using the setTimeout I am using in the TEST FILE. after investigating a lot I could make it walk, but that setTimeout is a time bomb. probe with jasmine-promises and in a thousand...
asked by 02.04.2018 / 21:13
0
answers

Run setInterval within a Promise in JavaScript

I want to execute a function that makes a call to ajax during intervals of 800 milliseconds and later after 10 seconds, to make stop of the setInterval (This in particular does not complicate me), the problem is that the call of this function de...
asked by 09.03.2018 / 18:51