Skip to content

Instantly share code, notes, and snippets.

@GavinJoyce
Forked from georges49/controllers.application.js
Last active November 28, 2016 15:27
Show Gist options
  • Save GavinJoyce/5dd6f0ca317d42ef7237f204e3220946 to your computer and use it in GitHub Desktop.
Save GavinJoyce/5dd6f0ca317d42ef7237f204e3220946 to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Component.extend({
});
import Ember from 'ember';
export default Ember.Controller.extend({
"openTag": "<div>",
"closeTag": "</div>"
});
<h2>What I want: </h2>
<div>
<button type="button">Button</button>
</div>
<h3>Here's sly7-7's suggestion</h3>
{{#my-component tagName="button"}}
I'm a button
{{/my-component}}
{{#my-component tagName="div"}}
I'm a div
{{/my-component}}
{{#my-component tagName="ul"}}
{{#my-component tagName="li"}}1{{/my-component}}
{{#my-component tagName="li"}}2{{/my-component}}
{{/my-component}}
{
"version": "0.10.5",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "2.8.0",
"ember-data": "2.8.0",
"ember-template-compiler": "2.8.0",
"ember-testing": "2.8.0"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment