How does ngfor specify the number of cycles

<div class="hot-img-div">
  <div *ngFor="let i of showmusicList;let id = index" (click)="showList(i.discover_id)">
    <div *ngIf="id>2 === false">
      <img src={{i.discover_pic}} class="hot-music-img" >
      

{{i.discover_title}}

</div> </div> </div>

as far as I think ngfor only loops three times, and then jumps out of the loop after three times. I now use ngif to judge the subscript of index. What else can you do? ask for help

.
Mar.22,2021

if you set it in HTML, you can do this:

let i of showmusicList.slice(0,3)

showmusicList take the first three. This is the idea of data-driven view.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e460d8-44b7b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e460d8-44b7b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?