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:aufgaben:14 [2025/03/18 07:40] – gelöscht vdemir | en:modul:m291:learningunits:lu05:aufgaben:14 [2025/03/28 11:36] (aktuell) – vdemir | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| + | ====== LU05.A14 - v-show and v-if combined ====== | ||
| + | |||
| + | ===== Prerequisites | ||
| + | * Work type: Individual | ||
| + | * Means of aid: only teaching materials, no websearch, no use of ai. | ||
| + | * Timeframe: 15 Minutes | ||
| + | * Expected result: A Vue script that uses both directives, v-if and v-show. | ||
| + | |||
| + | ===== Learning objectives ===== | ||
| + | - Using v-show | ||
| + | |||
| + | ===== Source ===== | ||
| + | * [[https:// | ||
| + | | ||
| + | ===== Assignment ====== | ||
| + | This assignment consists of using both, the v-if and the v-show, and comparing the html-dom reaktion. | ||
| + | |||
| + | - 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.S14.html. | ||
| + | - Have it run by clicking the // | ||
| + | - Just after the //div-tag// create a paragraph and move the current text in it (This text can be hidden). | ||
| + | - Move the v-show from div-tag into the paragraph-tag. | ||
| + | - Change the variable in the // | ||
| + | - Add another paragraph-tag for the //v-if// which contains a image and a suitable comment to it. | ||
| + | - The corresponding variable in the // | ||
| + | - 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 ===== | ||
| + | [[en: | ||
| + | |||
| + | |||
| + | |||
| + | ===== Vocabulary ===== | ||
| + | ^ English ^ German ^ | ||
| + | | bulb | Glühbirne | | ||
| + | |||
| + | |||
| + | |||
| + | ---- | ||
| + | [[https:// | ||