Hi, I am looping a json string using ngFor, but is it possible to show the number of loop elements and not show its value?
for example in my component i
items = {item1, item2, item3, item4}
and in the html template
<p *ngFor="let i of items>{{i}}</p>
then the result will be
item1
item2
item3
item4
but instead, since there are four elements in the object, I want to display the number 4 (the number of elements in the object).
4
How can i achieve this?
Thank!
source
share