Skip to content

Feature Request: Each tag #31

Open
@dak

Description

@dak

Proposal:

Add an <each> tag that functions similar to the dual <if>, which can be used as an attribute or as its own node. each would take a single attribute, condition.

Syntax:

<each condition="item in list">
    <span>{item}</span>
</each>

Reason:

<div each="item in list" if="true">{$value}</div> has two different potential meanings:

<each condition="item in list">
    <if condition="true">{$value}</if>
</each>

and

<if condition="true">
    <each condition="item in list">{$value}</each>
</if>

however, only the latter example is possible with the current syntax.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions