Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| en:modul:m291:learningunits:lu05:theorie:05 [2025/02/28 13:12] – vdemir | en:modul:m291:learningunits:lu05:theorie:05 [2025/03/21 14:31] (aktuell) – vdemir | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | ====== | + | ====== |
| ===== Learning ojectives ===== | ===== Learning ojectives ===== | ||
| - | - .... | + | - I can explain what function v-for directives fulfil within the DOM. |
| - | - | + | - I can explain which data types v-for is suitable for. |
| + | - I can name the list display variants that are possible with v-for. | ||
| + | |||
| + | ===== Source ===== | ||
| + | [[https:// | ||
| ===== Introduction ==== | ===== Introduction ==== | ||
| - | .... | + | The **v-for** directive in Vue.js is a powerful tool for rendering (the process of converting data, code or digital instructions into a visual representation on the screen) lists of elements in HTML templates. It allows developers to iterate through a data source and create a template element for each element in the data source (e.g. array). In addition to basic lists, **v-for** can also be used to iterate (loop through) a series of numbers, object properties or even nested structures. By combining it with other directives such as **v-bind** and **v-on**, **v-for** extends the possibilities of interactive data binding in Vue applications. |
| + | |||
| + | |||
| + | < | ||
| + | < | ||
| + | <li v-for=" | ||
| + | {{ index + 1 }}. {{ item }} | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| - | ===== TDB ===== | + | < |
| + | export default { | ||
| + | data() { | ||
| + | return { | ||
| + | items: [" | ||
| + | }; | ||
| + | } | ||
| + | }; | ||
| + | </ | ||
| + | **Explanation** | ||
| + | * The v-for=" | ||
| + | * : | ||
| + | * The output will be a list displaying " | ||
| ===== Vocabulary ===== | ===== Vocabulary ===== | ||
| ^ English ^ German ^ | ^ English ^ German ^ | ||
| - | | ...| ... | | + | | to render |
| + | | to iterate | wiederholen, | ||
| ---- | ---- | ||
| [[https:// | [[https:// | ||