Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| en:modul:m291:learningunits:lu05:aufgaben:15 [2025/03/14 16:56] – angelegt vdemir | en:modul:m291:learningunits:lu05:aufgaben:15 [2025/03/28 11:38] (aktuell) – [Assignment 1] vdemir | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | ====== LU05.A14 - v-show and v-if combined | + | ====== LU05.A15 - v-for list rendering |
| ===== Prerequisites | ===== Prerequisites | ||
| * Work type: Individual | * Work type: Individual | ||
| * Means of aid: only teaching materials, no websearch, no use of ai. | * Means of aid: only teaching materials, no websearch, no use of ai. | ||
| - | * Timeframe: | + | * Timeframe: |
| - | * Expected result: A Vue script that uses both directives, v-if and v-show. | + | * Expected result: A Vue script that uses the directives v-for with < |
| ===== Learning objectives ===== | ===== Learning objectives ===== | ||
| - | - | + | - Be able to explain the objective of v-for |
| + | - Displying the Index and corresponding array entry using v-for. | ||
| + | - Dispalying array elements and the corresponding images with v-for. | ||
| ===== Source ===== | ===== Source ===== | ||
| - | * [[https:// | + | [[https:// |
| - | + | ||
| ===== Assignment ====== | ===== Assignment ====== | ||
| - | This assignment consists | + | Data is often available as lists/ |
| + | |||
| + | | ||
| + | | ||
| + | - Add 3-4 more entries to your food list, at the beginning, the middle part, and the end. | ||
| + | | ||
| + | - Note down your observation as code comments and save your work. | ||
| + | |||
| - | - Click the link above to the code-exambpe to get to the W3School-TryOut area. | ||
| - | - Save the code with a suitable name, such as LU05.S13.html. | ||
| - | - Have it run by clicking the // | ||
| - | - Move the v-show from div-tag into the text-tag. Change the variable in the / | ||
| - | - Add into your p-tag a attribute //v-if//. The corresponding variable for that v-if is called // | ||
| - | - Now we can seperately control the visibility of the text and image ressource. | ||
| - | - Try out all four values for the // | ||
| - | - true / true | ||
| - | - true / false | ||
| - | - false / true | ||
| - | - false / false | ||
| - | - Note the result as a html-comment und beobachten Sie die Reaktion der Applikation. | ||
| - | - Save your result, you may need it as a exam-preparation. | ||
| ===== Solution ===== | ===== Solution ===== | ||
| [[en: | [[en: | ||
| + | |||
| + | |||
| Zeile 38: | Zeile 37: | ||
| ===== Vocabulary ===== | ===== Vocabulary ===== | ||
| ^ English ^ German ^ | ^ English ^ German ^ | ||
| - | | bulb | Glühbirne | + | | ... | ... | |