I
I
iBird Rose2016-11-27 22:48:45
Angular
iBird Rose, 2016-11-27 22:48:45

How to render ngFor output one by one?

In general, I display posts through ngFor. I would like to do a setTimeout for each post. so far it has been done for everyone.
plnkr.co/edit/oz71BFDAeeTwjwW5zqEY?p=preview

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey Zuev, 2016-11-29
@iiiBird

rxjs version plnkr.co/edit/XYUgjcUOWYRsl03puhhR?p=preview
Angular animation version plnkr.co/edit/u3XUMtdgFFB8EWcv6AL9?p=preview

V
Vitaly, 2016-11-27
@vitali1995

First, you are using an outdated version of Angular - the latest version compiles and builds on the built-in local node.js server.
I did not quite understand about setTimeout - where, why and why. Alternatively, each post can be made a separate component and a timeout can be run in the class of this component (OnInit).

V
Vladimir, 2016-11-28
@Casufi

Two options.
1) Write promises to the array and show only after the resolution of a specific promise (I would do this)
2) Generators frontender.info/es6-in-depth-generators

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question