Category : VueJs
Category : VueJs
Lifecycle hooks are the defined methods which gets executed in the certain stage on the Vue object lifespan. Starting from the initialization to till it gets destroyed, the object follows different phases of life. Here is the famous diagram indicating the hook sequence. (Image source : https://vuejs.org/v2/guide/instance.html#Lifecycle-Diagram) Let’s add our code to the hooks and
Welcome to the VueJs series with Nirmal. v-if The control structure followed by VueJs for the UI element rendering. v-if supports the control branching if..else if..else. A quick example to render spans based on the value typed in the input.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
<div id="app_div"> <input type="text" v-model="show_type"/> <span v-if="show_type=='Fruits'">Fruits</span> <span v-else-if="show_type=='Birds'">Birds</span> <span v-else>Animals</span> </div> <script> var app = new Vue({ el: "#app_div", data: { show_type: 'Birds' } }); </script> |
It renders the “Fruits” and “Birds” span when typed “Fruits” and “Birds” in the
What is Vue.Js A progressive javascript framework for building the UI. It is built on top of Javascript. Mainly focuses on the View layer for interactive UI designs. Any pre-requisite knowledge to learn it ? HTML, CSS and Javascript should be the basic one to know to start with it. A quick introduction to kick