Angular 2 - ngFor display last 3 items in array

前端 未结 4 617
情书的邮戳
情书的邮戳 2021-02-06 15:44

got an array with many projects and i want to display the last 3 projects.

got in my html

          
  • 4条回答
    •  抹茶落季
      2021-02-06 16:22

      As answered by Gunter above, you might also need to check the length of "projects" is greater than 4.

    • {{ project.name }}

      {{ project.meta_desciption }}

    提交回复
    热议问题