-
-
Save onlymejosh/7dcb1a0d38b218bc4fe4 to your computer and use it in GitHub Desktop.
yielding actions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
const { Controller, computed } = Ember; | |
export default Controller.extend({ | |
totalItems: 3, | |
items: computed(function() { | |
return [ | |
{id: 1, title:'1'}, | |
{id: 2, title:'2'}, | |
{id: 3, title:'3'}, | |
]; | |
}) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
const { Component } = Ember; | |
const ALL = Symbol(); | |
const ALL_EXCEPT = Symbol(); | |
const SOME = Symbol(); | |
const NONE = Symbol(); | |
export default Component.extend({ | |
// Server total of items, this can either be virtual or actual total | |
numTotalItems: 0, | |
// Items which are currently displayed | |
displayItems: [], | |
selectedItemIds: [], | |
delectedItemIds: [], | |
selectionState: NONE, | |
actions: { | |
onCheckboxChange(model, event) { | |
console.log(model, event.target.checked); | |
} | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.4.16", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.js", | |
"ember": "2.0.2", | |
"ember-template-compiler": "2.0.2" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment