I have a simple observable representing the length of a list.
As it evolve, I want to animate increments and decrements of that number, for example:
- the number increases
- I fade out the previous value
- I fade in the new value
But during the fade out, I can see the next value being already updated. The 2 ways I found to solve the problem are :
- manually manage value update by subscribing to observable from the TS controller
- the rxjs operator
delayWhen
to conditionnaly delay the value update (here is a french explanation of that method there is code as example)
Both seem too complicated for what I want. So here my question.
Is there a way to block DOM updates while animating an element?