Questions tagged as 'promesas'

2
answers

How can I make several consecutive requests if the previous one did not give me results in angularjs

var appServices = angular.module('miClaroServices',[]); appServices.factory('productoServicio', ['$http', '$q', function($http, $q) { // interface var service = { ListProducto: [], getListProductos: getListProductos }...
asked by 14.06.2016 / 17:43
0
answers

Proper implementation of javascript Promises Chaining [closed]

I made an implementation of Javascript Promises and I would like you to give me feedback on how I did it. I think I'm not doing it correctly in terms of chainning, also because in the code I have several levels of indentation. They almost look l...
asked by 22.08.2018 / 21:28
2
answers

Chaining of promises with mongodb querys

Good morning, I would like to know how to chain promises that have queries to the database (with a callback within the promise). On the internet I have found that a promise of javascript can be executed in the following way: function shareC...
asked by 16.05.2018 / 18:23
1
answer

Obtain and reuse a PromiseValue

The issue is that I need to get an arrangement with the available audio / video devices, but the function even if I print an array in the console, it does not return one to me, but it returns a promise. How can I get the value of a promiseValue...
asked by 24.11.2017 / 21:03
2
answers

How to correctly perform a function that returns a promise with Ionic?

I want to do a function that gives me back a promise, but I do not really understand the subject, what I tried is this MiFuncion(miParametro: string): Promise<void>{ // mi codigo ... console.log(miParametro) return new Promis...
asked by 18.10.2017 / 00:05
1
answer

SweetAlert: Unexpected 2nd argument

Good afternoon, I have the following code: function desactivar(idcategoria) { swal({ title: "Desactivar Categoría", text: "¿Está Seguro de desactivar la Categoría?", type: "warning", showCancelButton: true, confirmButtonColor: "#DD6B55",...
asked by 05.10.2017 / 19:45
0
answers

Wait for a service to finish to continue with another AngularJS

I would like to know how to wait until the execution of one service is finished before another is executed, this is because what the first service returns is necessary for the execution of the 2nd. Here is my service and my controller. conf...
asked by 03.08.2017 / 18:18
1
answer

Promises in ionic

I am practicing ionic to clarify concepts. In this case the promises. I have an app with 2 pages login and home. I want a user to validate the login, if it exists, redirect me to the home page. Otherwise stay in the form on the same page....
asked by 23.11.2017 / 15:47
1
answer

Set resulting text on a P tag

I have the result of a promise that if I execute this, it takes me as a console to the result I want: web3.eth.getBalance(localStorage.getItem('address')).then( console.log ); But when I try to put the value in a P-label, nothing appear...
asked by 17.12.2018 / 12:18
2
answers

Problem with promise when collecting values that returns

Within a function, I need to call another in which I have used promises and return a series of data that I need to follow. My problem is that I do not know if I'm doing it right or not, because does not throw an error but it returns an empty...
asked by 15.11.2017 / 10:57