Skip to content
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

$foreach.hasNext invalid #17

Open
SFlyers opened this issue Sep 9, 2020 · 5 comments
Open

$foreach.hasNext invalid #17

SFlyers opened this issue Sep 9, 2020 · 5 comments

Comments

@SFlyers
Copy link

SFlyers commented Sep 9, 2020

version 1.1.1

@jonorossi
Copy link
Member

@PettyHandSome is there a question? I don't know what hasNext is.

@SFlyers
Copy link
Author

SFlyers commented Sep 15, 2020

directive.foreach.iterator.name

@SFlyers
Copy link
Author

SFlyers commented Sep 15, 2020

How to judge the end of foreach loop?

@jonorossi
Copy link
Member

In NVelocity (which is a port of Velocity from about 15 years ago) we've got directive.foreach.counter.name which is by default named velocityCount (1-based), you could compare its value against your collection's length.

The other option is to use the #afterall section (see the docs).

@SFlyers
Copy link
Author

SFlyers commented Sep 15, 2020

In NVelocity (which is a port of Velocity from about 15 years ago) we've got directive.foreach.counter.name which is by default named velocityCount (1-based), you could compare its value against your collection's length.

The other option is to use the #afterall section (see the docs).

OK.Thanks

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

No branches or pull requests

2 participants