Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
en:modul:m291:learningunits:lu05:loesungen:08 [2025/01/27 13:29] vdemiren:modul:m291:learningunits:lu05:loesungen:08 [2025/03/27 09:23] (aktuell) – [Assignment] vdemir
Zeile 1: Zeile 1:
-====== LU05.S08 - v-====== +====== LU05.S08 - v-if with numbers instead of bool ======
- +
-===== Assignment ====== +
-  - Open the URL with the exercise, which is given above. +
-  - Add to the //style-area// a new class //myClass2// with the //background-color: red// +
-  - Add a new //div// which incorporates the second style element. +
-  - Toggle in the //script// area with the values //true// and //false//, which activates and deactivates wether the style are being used or not +
-  - Execute your script by having it //run//. +
-  - Save your solution accordingly. Therefore you might need a W3-School-Account. +
  
 ===== Sourcecode of the solution ===== ===== Sourcecode of the solution =====
-  * {{ :en:modul:m291:learningunits:lu05:loesungen:03_v-bind_ueb4_shorthand.zip | Sourcecode of the solution}} 
  
-You solution is supposed to look like the following image:+{{ :en:modul:m291:learningunits:lu05:loesungen:m291_lu05_s08.zip | Sourcecode of the solution}} 
 + 
 +===== Assignment ====== 
 +The first assignment checked by using v-if whether a certain variable was checked or not (true/false). Now, we want to go one step further and check not only whether it is true or false, but moreover which value it contains. By this, we would be able to tell the customer of how many typewriters we have in stock, which may be of some benefit for the customer as well as for us. 
 + 
 +  - Change the value of the variable //typewriter// to 0 und execute the script.  
 +  - Note your realisations as a html-comment. 
 +  - Change the content of the variable //typeWriter// to -1.  
 +  - What happens, if the value //typeWiter// has no value at all respectively is empty? 
 +  - Note your realisations as a js-comment or html-comment. 
 +  - Save your script acoordingly, whether in your W3School workspace or on you local computer in your code-editor Webstorm.
  
-{{:en:modul:m291:learningunits:lu05:loesungen:lu05.s06.png?800Result of the codechanging}}+{{:en:modul:m291:learningunits:lu05:loesungen:lu05.s08.png?1000|Codesolution}}
  
 ===== Vocabulary ===== ===== Vocabulary =====
  • en/modul/m291/learningunits/lu05/loesungen/08.1737980941.txt.gz
  • Zuletzt geändert: 2025/01/27 13:29
  • von vdemir