/vue-intro

simple page using vuejs

Primary LanguageJavaScript

vue-intro:

attribut binding:

  • you can use attribute binding to dynamically bind values to HTML attributes or element properties. Attribute binding allows you to set attributes or properties based on data or expressions in your Vue component.

list rendering:

  • you can use the v-for directive to render lists of items dynamically. The v-for directive allows you to iterate over an array or an object and generate HTML elements for each item in the collection.

event handling:

  • allows you to respond to events triggered by user interactions or custom events emitted by components. You can handle events using the v-on directive or its shorthand @ in the template, or by defining event handlers in the component's methods.

props :

  • refers to the mechanism for passing data from a parent component to a child component. It allows you to define custom attributes on a component and pass values to those attributes when using the component.
  • When a parent component wants to pass data to a child component, it can bind values to the child component's props. The child component can then access and use those values within its template or script.

emit method:

  • is used to trigger custom events from a child component to its parent component. It allows child components to communicate with their parent components and send data or signals. To emit an event from a child component, you can use the $emit method provided by Vue.js.

Demo:

project Demo