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({ | |
tagName: 'p' | |
}); |
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', | |
actions: { | |
someActionName() { | |
this.set('recordFromStore', | |
JSON.stringify(this.store.peekRecord('shape', 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.Component.extend({ | |
_willDestroyElement: Ember.on('willDestroyElement', function() { | |
Ember.assert('parentView undefined on willDestroyElement event', !Ember.isEmpty(this.get('parentView'))); | |
}) | |
}); |
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({ | |
classNameBindings: ['clicked'], | |
tagName: 'button', | |
click() { | |
this.set('clicked', true); | |
} | |
}); |
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({ | |
init() { | |
this.set('useIconsIsDefault', | |
!this.attrs.hasOwnProperty('useIcons') | |
); | |
this._super(...arguments); | |
}, | |
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 { computed } = Ember; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
date: computed('model', { | |
get() { | |
return this.get('moment').toDate(); | |
}, |
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 { inject } = Ember; | |
export default Ember.Controller.extend({ | |
actions: { | |
addFlashMessage() { | |
this.get('flashMessages').info('just a test'); | |
} | |
}, |
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 groupBy from 'ember-group-by'; | |
const { computed } = Ember; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
meetings: computed.readOnly('model'), | |
meetingsPerDay: groupBy('meetings', 'day') |
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 { computed } = Ember; | |
export default Ember.Controller.extend({ | |
data: computed(function(){ | |
var labels = ["January", "February", "March", "April", "May", "June"]; | |
return { | |
labels: labels, |
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 DS from 'ember-data'; | |
const { RESTAdapter } = DS; | |
export default RESTAdapter.extend({}); |
OlderNewer