Skip to content

Instantly share code, notes, and snippets.

View jenweber's full-sized avatar

Jen Weber jenweber

View GitHub Profile
@jenweber
jenweber / components.my-component.js
Last active September 25, 2019 16:06
Simple Select
import Ember from 'ember';
export default Ember.Component.extend({
selectedOption: null,
actions: {
setSelection: function(selected) {
this.set('selectedOption', selected)
console.log(this.get('selectedOption'))
},
submit: function(){
@jenweber
jenweber / controllers.application.js
Last active December 19, 2016 09:53 — forked from gokatz/controllers.application.js
qp from controller
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@jenweber
jenweber / components.my-component.js
Last active February 2, 2017 01:17
Weird onchange behavior
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
somethingChangedComponent: function() {
console.log('something changed Component')
}
}
});
@jenweber
jenweber / components.compass-component.js
Last active March 29, 2017 18:21
SVG animation and interaction
import Ember from 'ember';
export default Ember.Component.extend({
currentOrientation: 0,
});
@jenweber
jenweber / components.with-concurrency.js
Last active April 21, 2020 12:14
ember-concurrency demo
import Ember from 'ember';
import { task, timeout } from 'ember-concurrency';
export default Ember.Component.extend({
notify: Ember.inject.service('notify'),
actions: {
startECLoop: function() {
this.get('emberConcurrencyLoop').perform();
},
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Readonly Nested Data'
});
import Ember from 'ember';
export default Ember.Component.extend({
animateBool: true,
actions: {
applyAnimation() {
this.toggleProperty('animateBool')
}
}
});
@jenweber
jenweber / components.my-component.js
Last active May 25, 2017 23:04
Non-working closure actions
import Ember from 'ember';
export default Ember.Component.extend({
});
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
someAction(target) {
console.log('target', target)
}
}
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});