• +91 9723535972
  • info@interviewmaterial.com

Vue JS Interview Questions and Answers

Question - What do you understand by global registration in components in Vue.js?

Answer -

The global registration in components in Vue.js facilitates us to use it in the template of any root Vue instance (new Vue) created after registration.

In the global registration, the components created using Vue.component as follows:

Vue.component('my-component-name', {  
  // ... options ...  
})  
We can take multiple components which are globally registered in the vue instance,

Vue.component('component-a', { /* ... */ })  
Vue.component('component-b', { /* ... */ })  
Vue.component('component-c', { /* ... */ })  
new Vue({ el: '#app' })  
The above components can be used in the vue instance as follows:

  
    
    
    
  

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners