Skip to content

Instantly share code, notes, and snippets.

@twokul
Created July 1, 2016 16:14
Show Gist options
  • Save twokul/fba73b9d4526594022b7525f7c378e1c to your computer and use it in GitHub Desktop.
Save twokul/fba73b9d4526594022b7525f7c378e1c to your computer and use it in GitHub Desktop.
CP madness
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
series: Ember.computed(function() {
return [
null,
{ leftLimit: '67500.00', rightLimit: '72800.00', y: 26 },
null
];
})
});
<h1>Welcome to {{appName}}</h1>
<table class="base-data-viz-table">
<thead>
<tr>
<th>Foo</th>
<th>Bar</th>
</tr>
</thead>
{{#each series as |bucket|}}
{{log "bucket" bucket}}
{{#if bucket}}
<tr>
<td>{{bucket.leftLimit}}</td>
<td>{{bucket.rightLimit}}</td>
<td>{{bucket.y}}</td>
</tr>
{{/if}}
{{/each}}
</table>
{{outlet}}
{
"version": "0.10.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.6.0",
"ember-data": "2.6.1",
"ember-template-compiler": "2.6.0"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment