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({ | |
init() { | |
this._super(...arguments); | |
this.food = 'Burger'; | |
}, | |
actions: { | |
changeFood() { | |
this.set('food', 'Macaroni'); |
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: { | |
addName(name) { | |
this.get('validate')().then(result => { | |
this.get('sendUpName')(result); | |
}); | |
} | |
}, |
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: { | |
addName(name) { | |
this.get('asyncCall')(name).then(result => { | |
this.get('sendUpName')(result); | |
}); | |
} | |
}, |
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: { | |
addName(name) { | |
this.get('asyncCall')(name).then(result => { | |
// does this need to have an Ember.run call as well? I sure hope not, as you can chain promises and that'd be a lot of Ember.run()s... | |
this.get('sendUpName')(result); | |
}); | |
} |
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(`init called on component with id ${this.get('item.id')}`); | |
} | |
}); |
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({ | |
flavor: 'vanilla', | |
price: '2.50' | |
}); |
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({ | |
attributeBindings: ['style'], | |
style: 'height: 600px; overflow: auto; position: relative;', | |
result: 'Waiting...', | |
timeoutWaiting: false, | |
animationWaiting: false, | |
actions: { | |
callAjax() { |
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({ | |
taggyName: 'h1', | |
value: 'the value', | |
theInput: Ember.computed('value', 'taggyName', function() { | |
const tagName = this.get('taggyName'); | |
return Ember.String.htmlSafe(`<${this.get('taggyName')} class="jazz" contenteditable="true">${this.get('value')}</${this.get('taggyName')}>`); | |
}), | |