Skip to content

Instantly share code, notes, and snippets.

@brettburley
Created May 16, 2018 00:41
Show Gist options
  • Select an option

  • Save brettburley/1c8b7c0cafb8fe036f03b51a1c12e939 to your computer and use it in GitHub Desktop.

Select an option

Save brettburley/1c8b7c0cafb8fe036f03b51a1c12e939 to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
const EMOJIS = `๐Ÿต ๐Ÿ’ ๐Ÿฆ ๐Ÿถ ๐Ÿ• ๐Ÿฉ ๐Ÿบ ๐ŸฆŠ ๐Ÿฑ ๐Ÿˆ ๐Ÿฆ ๐Ÿฏ ๐Ÿ… ๐Ÿ† ๐Ÿด ๐ŸŽ ๐Ÿฆ„ ๐Ÿฆ“ ๐ŸฆŒ ๐Ÿฎ ๐Ÿ‚ ๐Ÿƒ ๐Ÿ„ ๐Ÿท ๐Ÿ– ๐Ÿ— ๐Ÿฝ ๐Ÿ ๐Ÿ‘ ๐Ÿ ๐Ÿช ๐Ÿซ ๐Ÿฆ’ ๐Ÿ˜ ๐Ÿฆ ๐Ÿญ ๐Ÿ ๐Ÿ€ ๐Ÿน ๐Ÿฐ ๐Ÿ‡ ๐Ÿฟ ๐Ÿฆ” ๐Ÿฆ‡ ๐Ÿป ๐Ÿจ ๐Ÿผ ๐Ÿพ ๐Ÿฆƒ`;
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
emojis: EMOJIS.split(' '),
actions: {
addEmoji(emoji) {
this.set('value', (this.get('value') || '') + emoji);
}
}
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
<input value={{value}}>
<br>
Count: {{emojis.length}}
<br>
{{#each emojis as |emoji|}}
<a {{action "addEmoji" emoji}}>{{emoji}}</a>
{{/each}}
<br>
<br>
{
"version": "0.13.1",
"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.16.2",
"ember-template-compiler": "2.16.2",
"ember-testing": "2.16.2"
},
"addons": {
"ember-data": "2.16.3"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment