Tag: promise

52 votes
3 answers
2.3K views
Angular 2 do not refresh view after array push in ngOnInit promise

I created a NativeScript app with angular 2, i have an array of objects that i expect to see in the frontend o

avatar
Mikki
0 1 0 9
asked 07 September, 2021
61 votes
22 answers
3K views
How do I convert an existing callback API to promises?

I want to work with promises but I have a callback API in a format like: 1. DOM load or other one time event:

avatar
Nereida
0 1 0 9
asked 07 September, 2021
56 votes
27 answers
864 views
Using async/await with a forEach loop

Are there any issues with using async/await in a forEach loop? I'm trying to loop through an array of fil

avatar
Robt
0 1 0 9
asked 07 September, 2021
61 votes
10 answers
1.5K views
AngularJS : Initialize service with asynchronous data

I have an AngularJS service that I want to initialize with some asynchronous data. Something like this: myMod

avatar
Omar
0 1 0 9
asked 07 September, 2021