Ryan Chandler 4 лет назад
Родитель
Сommit
2bd6ecc13a
1 измененных файлов с 12 добавлено и 0 удалено
  1. 12 0
      README.md

+ 12 - 0
README.md

@@ -506,6 +506,18 @@ You can nest `x-for` loops, but you MUST wrap each loop in an element. For examp
 </template>
 ```
 
+#### Iterating over a range
+
+Alpine supports the `i in n` syntax, where `n` is an integer, allowing you to iterate over a fixed range of elements.
+
+```html
+<template x-for="i in 10">
+    <span x-text="i"></span>
+</template>
+```
+
+This will output 10 spans, starting with an `i` value of 0.
+
 ---
 
 ### `x-transition`