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: 'Checkbox', | |
checkedAll: false, | |
actions: { | |
checkAll() { | |
console.log('check action'); | |
this.toggleProperty('checkedAll'); |
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({ | |
init() { | |
this._super(...arguments); | |
console.log('\ninit', this.get('vInit')); | |
this.set('vInit', 99); | |
}, | |
didReceiveAttrs() { |
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({ | |
updates: 0, | |
didUpdateAttrs() { | |
this._super(...arguments); | |
this.incrementProperty('updates'); | |
} | |
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', | |
init() { | |
this._super(...arguments); | |
console.log('Application Controller Init'); | |
} | |
}); |
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({ | |
age: 9000, | |
init() { | |
this._super(...arguments); | |
console.log('Init Component'); | |
this.set('list', Ember.A()); | |
}, |
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
{"lastUpload":"2018-06-04T12:35:34.365Z","extensionVersion":"v2.9.2"} |
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'; | |
import { later } from '@ember/runloop' | |
export default Ember.Component.extend({ | |
init() { | |
this._super(...arguments); | |
this.set('array', [{ id: 0, name: 'a' }, { id: 1, name: 'b' }]); | |
this.addObserver('[email protected]', () => console.log('changed')); | |
later(() => { | |
let el = this.array[1]; |
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({ | |
model: [2019, 2018, 2017, 2016], | |
value: null, | |
actions: { | |
change(year) { | |
console.log('Changed year to', year); |
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 ONE = ['abc', 'def']; | |
const TWO = ['ghi', 'jkl']; | |
export default Ember.Component.extend({ | |
model: ['--- Something', 'Else +++'], | |
secondModel: null, | |
value: null, |
OlderNewer