This file contains hidden or 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'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
_membersMaleCount: 1, | |
membersCount: 5, | |
membersMaleCount: Ember.computed('_membersMaleCount', { | |
get() { | |
return this.get('_membersMaleCount') | |
}, |
This file contains hidden or 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'; | |
export default Ember.Component.extend({ | |
}); |
This file contains hidden or 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'; | |
export default Ember.Component.extend({ | |
actions: { | |
selectionChanged(value) { | |
// Returns a function (it should!) | |
let action = this.get('attrs.onSelectionChanged'); | |
if(action) { | |
action(value); |
This file contains hidden or 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'; | |
export default Ember.Component.extend({ | |
}); |
This file contains hidden or 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 DAY_SUNDAY = 0; | |
const DAY_MONDAY = 1; | |
const DOW_SUNDAY_FIRST = [0, 1, 2, 3, 4, 5, 6]; | |
const DOW_MONDAY_FIRST = [1, 2, 3, 4, 5, 6, 0]; | |
export default Ember.Component.extend({ | |
displayDate: null, |
This file contains hidden or 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'; | |
export default Ember.Component.extend({ | |
tableMode: Ember.computed('mode', function() { | |
return this.get('mode') === 'table'; | |
}), | |
mode: 'table', | |
actions: { | |
toggleMode() { | |
const mode = this.get('mode'); |
This file contains hidden or 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'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
This file contains hidden or 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'; | |
export default Ember.Component.extend({ | |
actions: { | |
firstOne() { | |
console.log('firstOne called'); | |
this.sendAction('secondOne', 'two'); | |
}, | |
secondOne(arg) { |
This file contains hidden or 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'; | |
export default Ember.Component.extend({ | |
member: 0, | |
bleet(a, b, c) { | |
console.log('Member bleet!', arguments); | |
}, | |
actions: { | |
bleet(a, b, c) { | |
console.log('Action bleet!', arguments); |
This file contains hidden or 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
function Tokenizer(input) { | |
this.input = input; | |
this.length = input.length; | |
this.index = 0; | |
this.cutStart = 0; | |
this.cutEnd = 0; | |
} | |
var OPEN_BRACE = '{'; | |
var CLOSE_BRACE = '}'; |