Vue Basic Syntax
Vue Basic Syntax
Directives
- Event Binding:
v-onor shorthand@click - Attribute Binding:
v-bindor shorthand:attribute- Examples:
:input,:input.enter,:key
- Examples:
- Two-Way Binding:
v-model - Conditional Rendering:
v-ifv-else-ifv-elsev-show
- List Rendering:
v-for- Example:
v-for="goal in goals"
- Example:
Communication Between Components
- Props: Pass data from parent to child
- Emits: Send events from child to parent