Skip to content

Instantly share code, notes, and snippets.

@thousand
Last active October 28, 2020 19:59
Show Gist options
  • Save thousand/e45d6a60a5926e70d0331548b22bfe90 to your computer and use it in GitHub Desktop.
Save thousand/e45d6a60a5926e70d0331548b22bfe90 to your computer and use it in GitHub Desktop.
leeloo dallas multiblock
import Controller from '@ember/controller';
export default class ApplicationController extends Controller {
appName = 'Ember Twiddle';
}
body {
margin: 12px 16px;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 12pt;
}
* {
padding: 0.5rem;
}
.outer {
border: 1px solid;
}
.outer:before {
content: "outer component div";
}
.outer-wrapper-one {
border: 1px dotted;
}
.outer-wrapper-one:before {
content: "outer component inner wrapper one";
}
.outer-wrapper-two {
border: 1px dashed;
}
.outer-wrapper-two:before {
content: "outer component inner wrapper two";
}
.yield-block-wrapper-one {
border: 1px dotted fuchsia;
}
.yield-block-wrapper-one:before {
content: "yield block wrapper one";
}
.yield-block-wrapper-two {
border: 1px dashed fuchsia;
}
.yield-block-wrapper-two:before {
content: "yield block wrapper two";
}
.inner-one {
border: 1px dotted cyan;
}
.inner-two {
border: 1px dashed cyan;
}
<h1>Hi</h1>
<OuterComponent as |c|>
<div class="yield-block-wrapper-one">
<c.inner-one>Content of yield 1</c.inner-one>
</div>
<div class="yield-block-wrapper-two">
<c.inner-two>Content of yield 2</c.inner-two>
</div>
</OuterComponent>
<div class="inner-one">
{{yield}}
</div>
<div class="inner-two">
{{yield}}
</div>
<div class="outer">
<div class="outer-wrapper-one">
{{yield (hash inner-one=(component "inner-one"))}}
</div>
<div class="outer-wrapper-two">
{{yield (hash inner-two=(component "inner-two"))}}
</div>
</div>
{
"version": "0.17.1",
"EmberENV": {
"FEATURES": {},
"_TEMPLATE_ONLY_GLIMMER_COMPONENTS": false,
"_APPLICATION_TEMPLATE_WRAPPER": true,
"_JQUERY_INTEGRATION": true
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.js",
"ember": "3.18.1",
"ember-template-compiler": "3.18.1",
"ember-testing": "3.18.1"
},
"addons": {
"@glimmer/component": "1.0.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment