Skip to content
This repository has been 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

Closed
maxmart opened this issue Apr 27, 2012 · 0 comments
Closed

Comments

@maxmart
Copy link
Contributor

maxmart commented Apr 27, 2012

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants