New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

maxmart opened this Issue Apr 27, 2012 · 0 comments


None yet
2 participants

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 join this conversation on GitHub. Already have an account? Sign in to comment