Skip to main content

All Questions

0 votes
0 answers
161 views

angularjs async issue. how to load data from another component

I have to use "set timeout" to get the data from the parent component, so I can load it onto the page before the I wish to replace this with a promise or async function. But I can't seem to ...
jondar's user avatar
  • 11
1 vote
1 answer
102k views

Promise .then() to run sequentially inside a for loop

I'm trying to fill my $scope.results = [] sequentially by multiple sequential API calls. sequential is important as I'm passing in a start and a limit number (something like pagination). There is a ...
cmgchess's user avatar
  • 10.3k
0 votes
0 answers
97 views

AngularJS: ng-hide based off of value from promise

I have a textbox and a submit button. When the user clicks the submit button, my javascript does some checks to make sure that the input is "valid" and, then ideally would show an error ...
MrBabalafe's user avatar
2 votes
1 answer
41 views

Porting Promise Chaining from AngularJs to VueJs

Similar to my last question but different enough that I am at a loss. I have the following function in AngularJs that I need to recreate in VueJs. I have two similar ways I've tried to write this in ...
Sarah's user avatar
  • 703
1 vote
1 answer
170 views

Porting Promise.all functionality from AngularJs to VueJs

I have this function that I need to move from AngularJs to VueJs and it has me stumped! Any help would be appreciated :) items = { one: {...details here...}, two: {}, } AngularJs var promises ...
Sarah's user avatar
  • 703
1 vote
2 answers
146 views

Calling $http.post in batches and chaining promises

I have a use case where I have to call $http.post(request) on batches of the input data. For this, I created an array of requests. For each of them, I need to get the response of $http.post(), append ...
AmeyaS's user avatar
  • 46
0 votes
2 answers
61 views

Promise chain of catchs

I have this scenario: controller.ts methodA(): void { myServive.someMethod() .then( () => console.log("then") ) .catch( e => { console.log("catch"); })...
Luciano Borges's user avatar
0 votes
1 answer
76 views

Why does $q.all(promises).then() not wait for the promise?

I have to work with AngularJS 1.5.5. I am calling multiple Rest-Services and need to work with all the results at the same time. $scope.callWebservices = function(){ let promises = { first:...
1stkeks's user avatar
  • 25
0 votes
0 answers
50 views

Error doesn't return to the catch block of the calling function

The catch block from the called function doesn't return promise to the calling function. copyFunction = () => { this.Service.callCopyFnctn().then((response) => { console.log(response); ...
Shikha thakur's user avatar
0 votes
1 answer
539 views

Event listener "message", based on event name making an API call with promise in angularJs, javascript

I am trying to listen to a "message", by adding an event listener and based on an eventName property in the event data which is coming as string, I need to make a promise and fetch some data ...
kallaguntam's user avatar
0 votes
2 answers
53 views

Angular JS promise not returning value

I am new to Angular JS and I tried to load this JS in one of the files (cshtml extension), it did alert the message 'testing 1' but it did not alert 'testing 2'. Can I know whats the issue here. Your ...
Tan Yi Jing's user avatar
0 votes
1 answer
195 views

Cancel Request in AngularJS

I gone through some links: How to cancel an $http request in AngularJS? Cancelling ongoing Angular $http requests when there's a new request How to cancel a $http call from controller in Angular ...
Anil Kumar's user avatar
1 vote
0 answers
69 views

I am having trouble binding a model field in angularjs with cascading dropdowns binding before the HTTP.GET that fills them's promise is satisfied

I am very new to AngularJS and have inherited what I think to be a half baked project. I am terrified the answer is going to be "you need to rewrite the whole thing and rethink your approach. ...
MooseManCA's user avatar
0 votes
3 answers
3k views

foreach loop with promise execute API call AFTER the first one is done

let array = [1,2,3]; array.forEach(function(item,index) { var data = fetch('https://reqres.in/api/products/'+item); //wait for response after response come then next iterating a loop (first,...
jignesh's user avatar
  • 53
0 votes
3 answers
1k views

How to properly write es5 Promise JavaScript AngularJs

Hi I am trying to write this function as a promise, I know how to write async functions in es6 but in es5 I am strugling This is wath I tried: function getLeagueByID(sportID) { console.log(...
Emilis's user avatar
  • 162

15 30 50 per page
1
2 3 4 5
75