Key points of Vue.js in 5 mins

How to create  a vue app.

Creation of a vue app at least takes 2 parameters. el element to append. data– data that component deals with.

  • vue directives start with `v-`.
  • v-model for two way binding.
  • `if` condition is implemented as v-if 
  • iterate over arrays with v-for
    <li v-for="todo in todos">
  • vue js has this thing called `computed`
  • v-bind:some_attribute is used to bind some behavior to the html elements.
  • v-on:some_event is used to trigger events.
  • pass behavior as methods. the method name can be called just as a string.
  • v-html is used if to tell vuejs to render html code. By default Vue js always renders text.
  • ​​​​v-text for one way binding. v-model for 2way binding.
  • To call a method from curly braces we need parenthesis. like {{add()}} not {{add}}


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.