Skip to product information
1 of 1

vue default slot

Vue Tricks - Passing Slots to Child Components

Vue Tricks - Passing Slots to Child Components

Regular price 1000 ₹ INR
Regular price Sale price 1000 ₹ INR
Sale Sold out

vue default slot

Vue Tricks - Passing Slots to Child Components vue default slot A default slot is defined in the child component template using the element without a name attribute When using a default slot, the content vue slotscope I have two components, one that passes a string value innerHTML to my custom Component MySub In MySub i wants to use the default slot to do

vue slotscope vue This rule applies Child nodes not belonging to a template> slot exist when the parent component has an explicit template> for the default slot

vue slot name The slots also support default content which will render if a named slot remains unfulfilled View code for this lesson Transcript Comments Notice that the order of the texts rendered corresponds to the slots arranged in the child component The unnamed slot acts as the default slot Scoped Slots

View full details