Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Vertical Thing
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
items: [],
actions: {
createItems () {
for (let i = 0; i < 500; i++) {
this.get('items').pushObject({
number: i,
name: `item ${i}`
});
}
}
}
});
body {
margin: 12px 16px;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 12pt;
}
<h1>Welcome to {{appName}}</h1>
<button {{action 'createItems'}}>createem</button>
<br>
{{#each items as | item |}}
{{item.name}}
{{/each}}
<br>
{{outlet}}
<br>
<br>
{
"version": "0.12.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.12.0",
"ember-template-compiler": "2.12.0",
"ember-testing": "2.12.0"
},
"addons": {
"ember-data": "2.12.1",
"@html-next/vertical-collection": "^1.0.0-beta.4"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.