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:10 [2025/03/04 12:16] – vdemir | en:modul:m291:learningunits:lu05:aufgaben:10 [2025/03/28 10:55] (aktuell) – [Vocabulary] vdemir | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | ====== LU05.A09 - v-else-if and v-else | + | ====== LU05.A10 - v-if and functions |
| ===== Prerequisites | ===== Prerequisites | ||
| Zeile 9: | Zeile 9: | ||
| ===== Learning objectives ===== | ===== Learning objectives ===== | ||
| - Explaining the The directive //v-if// in your own word. | - Explaining the The directive //v-if// in your own word. | ||
| - | - Being able to apply v-if in combination wit e-else-if and v-else | + | - Being able to apply v-if in combination wit a function |
| - | ===== Source | + | ===== Sourcecode of the solution |
| - | * [[https:// | + | * Example without image: |
| - | | + | |
| - | ===== Assignment ====== | + | |
| - | In this assignment we are going to use //v-if// in compination with both //v-else-if// and //v-else-if//. This three selection elements of VUE allow us to check up to any number of values, e.g. //in stock//, //very few left// oder //not on stock//. | + | |
| - | | + | ===== Assignment 1 ====== |
| - | - Introduce an additional | + | As we are now capable to use //v-if// with logical values (true/ |
| - | - Note your realisations as a html-comment. | + | |
| - | - Save your script | + | - Execute the script. As you can see the content of the variable |
| + | - Now delete the word //Pizza// from the variable //text// in the script-area. Execute your script again. | ||
| + | - Note your realisations as a comment. | ||
| + | - Save your script acordingly, whether in your W3School workspace or locally in your Webstorm code-editor | ||
| + | |||
| + | ===== Assignment 2 ===== | ||
| + | In the if paragraph | ||
| + | |||
| + | - Add a section // | ||
| + | - Note your realisations as a code-comment. | ||
| + | - Save your script | ||
| ===== Solution ===== | ===== Solution ===== | ||
| Zeile 29: | Zeile 37: | ||
| ^ English ^ German ^ | ^ English ^ German ^ | ||
| | afterwards | anschliessend| | | afterwards | anschliessend| | ||
| + | | accordingly | entsprechend | | ||