mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
doc reference for getLength() of loop status-var
This commit is contained in:
parent
36ba6763fd
commit
ba7d41b28a
@ -932,7 +932,8 @@ The `for` directive also supports a loop status variable in case you need to kno
|
||||
```xml
|
||||
<ul>
|
||||
<li for="color in colors; status-var=loop">
|
||||
${loop.getIndex()+1}) $color
|
||||
$color
|
||||
${loop.getIndex()+1}) of ${loop.getLength()}
|
||||
<if test="loop.isFirst()"> - FIRST</if>
|
||||
<if test="loop.isLast()"> - LAST</if>
|
||||
</li>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user