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:theorie:01 [2025/01/22 08:45] – vdemir | en:modul:m291:learningunits:lu05:theorie:01 [2025/01/22 13:58] (aktuell) – [Source] vdemir | ||
|---|---|---|---|
| Zeile 4: | Zeile 4: | ||
| - I can explain what //Vue Directives// | - I can explain what //Vue Directives// | ||
| - I can explain what //Vue Directives// | - I can explain what //Vue Directives// | ||
| - | - I can name and explain at least five examples | + | - I can name and explain at least four types of directives. |
| - I can use VUE directives as an example. | - I can use VUE directives as an example. | ||
| ===== Introduction ===== | ===== Introduction ===== | ||
| Vue directives are special tokens in //Vue.js// that extend the functionality of HTML by providing dynamic behavior to DOM elements. They are prefixed with //v-// and are used to bind data, manipulate DOM attributes, or listen to events. Common directives include //v-bind// for binding attributes, //v-if// for conditional rendering, and //v-for// for looping over data. By leveraging directives, developers can create highly interactive and reactive user interfaces with minimal effort. | Vue directives are special tokens in //Vue.js// that extend the functionality of HTML by providing dynamic behavior to DOM elements. They are prefixed with //v-// and are used to bind data, manipulate DOM attributes, or listen to events. Common directives include //v-bind// for binding attributes, //v-if// for conditional rendering, and //v-for// for looping over data. By leveraging directives, developers can create highly interactive and reactive user interfaces with minimal effort. | ||
| + | |||
| + | ===== Key Features ===== | ||
| + | ** 1. Reactivity: | ||
| + | |||
| + | ** 2. Extensibility: | ||
| + | |||
| + | ** 3. Simplicity: **Integrate seamlessly into templates for common tasks like event handling or conditional rendering. | ||
| + | |||
| + | ===== Examples ===== | ||
| + | - **v-if**: Conditionally renders an element or removes it from the DOM based on the truthiness of an expression. | ||
| + | - **v-for**: Iterates over a list or object, generating a new element for each item in the collection. | ||
| + | - **v-bind**: Dynamically binds an attribute (e.g., `src`, `class`, `style`) to an expression, allowing for reactive updates. | ||
| + | - **v-model**: | ||
| + | |||
| ===== Source ===== | ===== Source ===== | ||
| * [[https:// | * [[https:// | ||
| + | **Tutorial with the concrete use of VUE directives** | ||
| + | |||
| + | {{ : | ||
| ===== Vocabulary ===== | ===== Vocabulary ===== | ||
| ^ English ^ German ^ | ^ English ^ German ^ | ||
| | token| Merkmal, Eigenschaft| | | token| Merkmal, Eigenschaft| | ||
| | to leverage | einsetzen, anwenden | | | to leverage | einsetzen, anwenden | | ||
| + | |||
| + | ---- | ||
| + | [[https:// | ||