Skip to content

Instantly share code, notes, and snippets.

@rwjblue
Last active March 13, 2016 23:39
Show Gist options
  • Save rwjblue/4556826aac0e7b2a60ef to your computer and use it in GitHub Desktop.
Save rwjblue/4556826aac0e7b2a60ef to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Route.extend({
model() {
var stuff = [];
for (var i = 0; i < 1000; i++) {
stuff.push({name: 'Item' + i});
}
return stuff;
}
});
<h1>Simple ember-collection Twiddle Demo!</h1>
<div style="position: relative;height: 200px; width: 400px;">
{{#ember-collection items=model cell-layout=(fixed-grid-layout 400 20) as |item|}}
{{item.name}}
{{/ember-collection}}
</div>
{
"version": "0.5.0",
"EmberENV": {
"FEATURES": {}
},
"options": {
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "2.2.0",
"ember-data": "2.2.0",
"ember-template-compiler": "2.2.0",
"ember-collection": "https://rawgit.com/rwjblue/e4b74b094b5955ba9b35/raw/cce3b30ff156d778e61061c95b7834ace7592a8c/ember-collection-demo.js"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment