Skip to content

Instantly share code, notes, and snippets.

@minhnq013
Last active February 24, 2016 22:53
Show Gist options
  • Save minhnq013/4fca56d639e85cf2a642 to your computer and use it in GitHub Desktop.
Save minhnq013/4fca56d639e85cf2a642 to your computer and use it in GitHub Desktop.
EmberComputed aggregation not working
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
proxyList: Ember.A([
{name: 'minh', expired: true},{name: 'van', expired: true}, {name: 'spree', expired: true}
]),
allExpired: Ember.computed('[email protected]', function() {
console.log('firing');
return this.get('proxyList').isEvery("expired", true);
})
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
All: {{allExpired}} {{input type="checkbox" checked=allExpired}}
<br>
{{#each proxyList as |item|}}
{{item.name}}:
{{item.expired}}
{{input type="checkbox" checked=item.expired}}
{{/each}}
<br>
<br>
{
"version": "0.6.0",
"EmberENV": {
"FEATURES": {}
},
"options": {
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "1.13.13",
"ember-data": "https://cdnjs.cloudflare.com/ajax/libs/ember-data.js/2.3.3/ember-data.js",
"ember-template-compiler": "1.13.13"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment