Problems encountered in ngFor in angular4

the following code is available:

Component

   

The

page is displayed as expected, but not in the console, that is, the ngFor in the template is called four times!

what is the reason for this? Or can this be avoided?

Mar.13,2021

it is not recommended to call the function directly on the template, and change detection is performed each time.

Menu