Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
en:modul:m291:learningunits:lu05:aufgaben:14 [2025/03/14 16:29] – angelegt vdemir | en:modul:m291:learningunits:lu05:aufgaben:14 [2025/03/28 11:36] (aktuell) – vdemir | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ====== LU05.A13 - v-show | + | ====== LU05.A14 - v-show |
===== Prerequisites | ===== Prerequisites | ||
Zeile 5: | Zeile 5: | ||
* 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: 15 Minutes | * Timeframe: 15 Minutes | ||
- | * Expected result: A Vue script that fades-in and fades-out images. | + | * Expected result: A Vue script that uses both directives, v-if and v-show. |
===== Learning objectives ===== | ===== Learning objectives ===== | ||
Zeile 11: | Zeile 11: | ||
===== Source ===== | ===== Source ===== | ||
- | * [[ool: <a href="https:// | + | * [[https:// |
| | ||
===== Assignment ====== | ===== Assignment ====== | ||
- | This assignment | + | This assignment |
- Click the link above to the code-exambpe to get to the W3School-TryOut area. | - 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. | + | - Save the code with a suitable name, such as LU05.S14.html. |
- Have it run by clicking the // | - Have it run by clicking the // | ||
- | - Search in the internet for images of bulbs and save it in your workspace in the director | + | - Just after the //div-tag// create a paragraph and move the current text in it (This text can be hidden). |
- | - Create a own paragraph-tag. | + | - Move the v-show from div-tag into the paragraph-tag. |
- | - Use the v-show directive | + | - Change |
+ | - Add another paragraph-tag | ||
+ | - The corresponding variable in the //script-area// for the 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. | - 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. | - Save your result, you may need it as a exam-preparation. |