Advertisement
Guest User

Untitled

a guest
Feb 27th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. import Ember from 'ember';
  2.  
  3. export default Ember.Controller.extend({
  4. appName: 'Ember Twiddle',
  5. checkboxes: Ember.computed(function() {
  6. return Array.from({length: 4}, (x, i) => {
  7. return {
  8. index: i,
  9. checked: i >= 2
  10. };
  11. });
  12. }),
  13. checkboxesAsJson: Ember.computed('checkboxes.@each.checked', function() {
  14. return JSON.stringify(this.get('checkboxes'), null, 2);
  15. }),
  16. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement