Skip to content

Instantly share code, notes, and snippets.

@alexdiliberto
Last active June 11, 2018 17:58
Show Gist options
  • Save alexdiliberto/3777f4c5f2f27930b56bac5589314f6d to your computer and use it in GitHub Desktop.
Save alexdiliberto/3777f4c5f2f27930b56bac5589314f6d to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Component.extend({
name: 'special tag!'
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
summary: [
'tag 1 (plain string)',
'<span style="color: orange;">tag 2 (style attr)</span>',
'{{special-tag name="tag 3 (component)"}}',
'{{component "special-tag"}}',
'some string plug component {{special-tag}}'
]
});
body {
margin: 12px 16px;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 12pt;
}
.tag {
border: 1px solid red;
}
<h1>Welcome to {{appName}}</h1>
<br>
{{#each summary as |tag|}}
<span class="tag">{{{tag}}}</span>
<br>
<br>
{{/each}}
{
"version": "0.14.1",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js",
"ember": "2.18.2",
"ember-template-compiler": "2.18.2",
"ember-testing": "2.18.2"
},
"addons": {
"ember-data": "2.18.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment