Vuejs interview questions and answers | Vuejs Interview – Vuejs Top 10 Interview Qyestions

Vuejs interview questions and answers | Vuejs Interview – Vuejs Top 10 Interview Qyestions

1.What is Vue.js?

The Progressive JavaScript Framework
Vue (pronounced /vjuː/, like as view (display)) is a simple progressive framework for (user friendly)building user interfaces
monolithic frameworks
-Vue is easy. Angular is not.
-Vue is modular. Angular is not.
-Vue is simple. Angular is not.

READ :  vuejs Introduction hello world example

2.what is the Future of VueJS?

-Simple easily write simple JavaScript framework
-It id source code is very short readable
-Vue.js is a very great framework with a new considerable amount of momentum.
-It has very quickly overtaken other or React.js and jQuery plugin in terms of popularity.(light way)
– Simplicity and ease of use
-Vue.js does not any require webpack or other libs. However,
-we can develop Vue.js with webpack
-browserify templates.
-Vue.js + GitLab === Less code

3.what is the Components in Vue.js?

Components are one of the simple most very powerful all the features of Vue.
They can help you extend basic (DOME elements) HTML elements to simple encapsulate reusable very nice code.
At a high level code and light way data getting, components are all the widget are custom elements that Vue’s compiler and id to attaches behavior to.

READ :  Todo Smart Task schedule Lists using Vuejs Examples

Syntax of Vuejs – components
[php]
Vue.component(‘my-component’, {
// options
})
[/php]
Example
[php]

[/php]

4.What is vue-resource?

The plugin for Vue.js all the https provides services for making (get or post method )web requests and handle all the success or error responses using a XMLHttpRequest or JSONP data using vuejs. Installation : “$ npm install vue-resource”

5.How routing works in VueJS

we can do so by simple dynamically read or setup navigation rendering a page-level component

Simple Routing From Scratch
[php]
const NotFound = { template: ‘

here Page not found

‘ }
const Live = { template: ‘

Live page

‘ }
const Tutorial = { template: ‘

Tutorial page

READ :  VueJS MVC Application Architecture - VueJS model view controller example

‘ }
const routes = {
‘/’: Live,
‘/Tutorial’: Tutorial
}
new Vue({
el: ‘#liveapp’,
data: {
currentRoute: window.location.urlpathname
},
computed: {
ViewComponent () {
return routes[this.currentRoute] || NotFound
}
},
render (h) { return h(this.ViewComponent) }
})
[/php]

6.List of Filters in vuejs?

1.capitalize
2.uppercase
3.lowercase
4.currency
5.pluralize
6.json
7.key
8.filterBy
9.orderBy

7.How many types are Directives in Vuejs?

There are 3 types of Directives in vuejs.
Reactive Directives
Literal Directives
Empty Directives

8.List of Directives using vuejs

*] v-text
*] v-html
*] v-show
*] v-class
*] v-attr
*] v-style
*] v-on
*] v-model
*] v-if
*] v-repeat
*] v-with
*] v-events
*] v-component
*] v-partial
*] v-transition
*] v-ref
*] v-el
*] v-pre
*] v-cloak

9.List of Global API using vuejs

There are the Following List of Global API using vuejs.
1 : Vue.config
2 : Vue.extend
3 : Vue.directive
4 : Vue.filter
5 : Vue.component
6 : Vue.transition
7 : Vue.partial
8 : Vue.nextTick
9 : Vue.use
10 : Vue.util

10.Lifecycleusing vuejs

Phase : 1 vm.$mount
Phase : 2 vm.$destroy
Phase : 3 vm.$compile
Phase : 4 vm.$addChild

Example

Leave a Comment