ngFor with index as value in attribute

Source: https://stackoverflow.com/questions/35405618/ngfor-with-index-as-value-in-attribute

<ul>
    <li *ngFor="let item of items; let i = index" [attr.data-index]="i">
        {{item}}
    </li>
</ul>

Không có nhận xét nào:

api feed with published=false?

  Câu trả lời ngắn gọn là: CÓ . Trên thực tế, đây chính là cách chuẩn nhất để tạo các bài viết chưa hiển thị công khai (bao gồm Bản nháp, B...