• +91 9723535972
  • info@interviewmaterial.com

Vue JS Interview Questions and Answers

Question - What are slots?

Answer -

Vue implements a content distribution API using the element to serve as distribution outlets for content created after the current Web Components spec draft.

Let's create an alert component with slots for content insertion,

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

  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