R
R
Robert2016-08-11 22:38:06
JavaScript
Robert, 2016-08-11 22:38:06

How to control the order in which data is loaded in Angular?

There are two factories, each of which makes it possible to return an array of objects from the API.
There is pagination that should only work when data is loaded from both the first and second Factory.
How can I make pagination start working only when the functions of EVERY Factory have worked out?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
_
_ _, 2016-08-12
@Jowan

If the Factory returns promises, then $q.all([p1, p2])

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question