Skip to content

v-for need empty tag for a group of element,something like ng-container with angular #7013

@leapit

Description

@leapit

What problem does this feature solve?

Sometimes we don't really want a html element,for example in angular, we do loop like below,we don't want additional tag between ul and li,ng-cotainer solved the problem,is there any solution in Vue?

<ul class="book-list">
  <ng-container *ngFor="let book of books">
    <li class="book-item">{{ book.title }}</li>
    <li class="book-item">{{ book.author }}</li>
    <li class="book-item">{{ book.price }}</li>
  </ng-container>
</ul>

What does the proposed API look like?

Just like angular solution

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions