Skip to content

Instantly share code, notes, and snippets.

@ndtuan412
ndtuan412 / pass-slots.md
Created November 28, 2019 03:44 — forked from loilo/pass-slots.md
Vue: Pass Slots through from Parent to Child Components

Vue: Pass Slots through from Parent to Child Components

The Situation

  • We've got some components A, B and C which provide different slots.
    const A = {
      template: `<div><slot name="a">Default A Content</slot></div>`
    }

const B = {

@ndtuan412
ndtuan412 / app.html
Last active December 29, 2016 12:10 — forked from anonymous/app.html
DI inheritance
<template>
<require from="./test"></require>
<require from="./test2"></require>
<require from="./test3"></require>
<h1>${message}</h1>
<test>
<template replace-part="name">
, replaced
<button click.delegate="func()">click</button>
${title}