Angular2 spinner for ngFor

I have ngForwith a lot of elements that are displayed, and I want to show the spinner while the elements are not only loading, but also being displayed.

I know how I can display the counter when loading items from the server (i.e. observables), but this takes a little time in my case. I see that most of the time is spent on a browser displaying all the elements ngFor, and I don’t know how to make sure that the counter is still displayed for this process. I tried the ngAfterViewCheckedlifecycle hook , but it also fires to completion ngFor.

So, I wonder if there is a way to connect to this process? Alternatively, can we get Angular2 / browser to display elements ngForin stages? That is, show the elements as they are displayed, and show them all immediately after creating the templates.

I am using Angular 2.0.0. Any help was appreciated.

+4
source share
1 answer

I don’t have a demonstration yet, but I want to share the direction . I am looking for a solution - this can help anyone who stumbles upon this question.

Angular Universal. , - . Angular Universal .

, Angular

Angular Universal node.js . node.js Express Hapi.js. node.js, Angular Universal ASP.NET Core. Java, PHP Python.

Google Node.js . , node.js , Angular Universal .

, , Angular Universal on App Engine: Angular4 serverside- google-app-engine

: Angular 2 Angular .

0

Source: https://habr.com/ru/post/1669582/


All Articles