Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| en:modul:m291:learningunits:lu05:theorie:02 [2025/01/22 14:24] – angelegt vdemir | en:modul:m291:learningunits:lu05:theorie:02 [2025/01/23 09:20] (aktuell) – vdemir | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | ====== | + | ====== |
| ===== Learning ojectives ===== | ===== Learning ojectives ===== | ||
| Zeile 5: | Zeile 5: | ||
| - Naming what kind of object v-bind can include into the HTML-DOM | - Naming what kind of object v-bind can include into the HTML-DOM | ||
| - Using v-bind in a simple cases | - Using v-bind in a simple cases | ||
| + | |||
| + | ===== Sources ===== | ||
| + | * [[https:// | ||
| + | |||
| ===== What is v-bind? ===== | ===== What is v-bind? ===== | ||
| - | v-bind is a Vue.js directive that allows you to dynamically bind attributes or properties to a value in your Vue instance' | + | v-bind is a Vue.js directive that allows you to dynamically bind attributes or properties to a value in your Vue instance' |
| ===== Key Points ===== | ===== Key Points ===== | ||
| Zeile 14: | Zeile 18: | ||
| * **Reactivity: | * **Reactivity: | ||
| - | ===== Sources ===== | ||
| - | [[https:// | ||
| - | ===== Introduction ===== | ||
| - | https://www.w3schools.com/vue/vue_v-bind.php | + | |
| + | |||
| + | ===== Examples ===== | ||
| + | |||
| + | ==== Binding an Image Source ==== | ||
| + | **html** | ||
| + | |||
| + | <img v-bind: | ||
| + | <!-- Shorthand --> | ||
| + | <img : | ||
| + | |||
| + | **javascript** | ||
| + | |||
| + | data() { | ||
| + | return { | ||
| + | imageSrc: "https://example.com/image.jpg", | ||
| + | }; | ||
| + | } | ||
| + | |||
| + | ==== Binding Classes Dynamically ===== | ||
| + | **html** | ||
| + | <div v-bind: | ||
| + | <!-- Shorthand --> | ||
| + | <div : | ||
| + | |||
| + | **javascript** | ||
| + | data() { | ||
| + | return { | ||
| + | isActive: true, | ||
| + | isBold: false, | ||
| + | }; | ||
| + | } | ||
| + | |||
| + | |||
| + | ==== Bindung Styles ==== | ||
| + | **html** | ||
| + | <div v-bind: | ||
| + | <!-- Shorthand --> | ||
| + | <div : | ||
| + | |||
| + | **javascript** | ||
| + | data() { | ||
| + | return { | ||
| + | textColor: " | ||
| + | fontSize: 16, | ||
| + | }; | ||
| + | } | ||
| ===== Vocabulary ===== | ===== Vocabulary ===== | ||
| ^ English ^ German ^ | ^ English ^ German ^ | ||
| - | | token| Merkmal, Eigenschaft| | + | | ...| ... | |
| - | | to leverage | einsetzen, anwenden | + | |
| ---- | ---- | ||
| [[https:// | [[https:// | ||