• +91 9723535972
  • info@interviewmaterial.com

Vue JS Interview Questions and Answers

Question - What do you understand by slots in Vue.js?

Answer -

In Vue.js, the element is used to serve as distribution outlets for content.

Let's take an example to create an alert component with slots for content insertion.

Example:

In Vue.js, the element is used to serve as distribution outlets for content.

Let's take an example to create an alert component with slots for content insertion.

Example:

Vue.component('alert', {  
  template: `  
   
  
      Error!  
        
   
`  
})  
We can insert dynamic content as follows:

  
  There is an issue with in application.  
  

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners