Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

$position in repeat directive can't be both first and last at the same time #912

@maxmart

Description

@maxmart

Currently the $position property inside the repeat directive is either 'first', 'middle' or 'last'.
But if the list only has one item, the $position is set to 'first' by angular, even though it is actually both the first and last item.

Since this subtlety can't (reasonably) be represented by a single variable, something else is required. One way to solve it would be to have three boolean properties, $first, $middle and $last instead.

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