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'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
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 { computed, defineProperty } from '@ember/object'; | |
import { later } from '@ember/runloop'; | |
export default Ember.Controller.extend({ | |
init() { | |
later(() => { | |
defineProperty(this, 'delayedProperty', computed(() => 'foo')); | |
this.notifyPropertyChange('delayedProperty'); | |
}, 2000); | |
}, |
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'; | |
import { computed, get } from '@ember/object'; | |
export default Ember.Component.extend({ | |
baz: computed('foo', { | |
get() { | |
alert(get(this, 'foo')); | |
} | |
}) | |
}); |
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'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
count: 4, | |
rawCount: 4, | |
actions: { | |
update(value) { | |
if (value > 999) { | |
this.set('count', 999); |
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'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); | |
// Broken on 2.10.2 | |
// Works as expected on 2.9.1 |
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'; | |
export default Ember.Controller.extend({ | |
appName: '#15545', | |
aliased: Ember.computed.alias('appName'), | |
init() { | |
this._super(...arguments); | |
console.log('before:', this.cacheFor('aliased')); | |
console.log('get:', this.get('aliased')); |
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'; | |
export default Ember.Controller.extend({ | |
appName: 'https://github.com/emberjs/ember.js/issues/15842' | |
}); |
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'; | |
export default Ember.Component.extend({ | |
// Comment out below to work around | |
target: 'body', | |
actions: { | |
buttonClick() { | |
this.sendAction('onClick'); | |
} |
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 values = [ | |
0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 | |
]; | |
export default Ember.Controller.extend({ | |
sliderIndex: 1, | |
values: Ember.computed('sliderIndex', function() { |
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'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
NewerOlder