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 { task, timeout } from 'ember-concurrency'; | |
const { Component, get, set } = Ember; | |
export default Component.extend({ | |
tagName: '', | |
init() { | |
this._super(...arguments); | |
this.data = []; |
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({ | |
queryParams: ['greeting'], | |
greeting: 'Hallo' | |
}); |
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 { Route } = Ember; | |
export default Route.extend({ | |
model({ fullName }) { | |
return this.store.queryRecord('user', { fullName }); | |
} | |
}); |
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 { task, timeout } from 'ember-concurrency'; | |
import GiphyClient from '../lib/giphy-client'; | |
const { Component, computed, get, set, isBlank } = Ember; | |
const GIPHY_DEBOUNCE = 1000; | |
export default Component.extend({ | |
init() { | |
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'; | |
import makeMixin from '../utils/make-mixin'; | |
const mixinA = makeMixin({ value: 'a' }); | |
const mixinB = makeMixin({ value: 'B' }); | |
export default Ember.Controller.extend(mixinB, { | |
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 Ember from 'ember'; | |
import { task, timeout } from 'ember-concurrency'; | |
export default Ember.Component.extend({ | |
value: undefined, | |
timeout: 1000, | |
_updateValue: task(function*(value) { | |
this.set('value', value); | |
yield timeout(this.get('timeout')); |
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 { pipeline, step, CANCEL } from 'ember-pipeline'; | |
import timeout from '../utils/timeout'; | |
export default Ember.Controller.extend({ | |
result: 'Nothing run yet', | |
value: 10, | |
fizzBuzz: Ember.computed(function() { | |
return pipeline(this, [ |
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 { | |
String: { capitalize }, | |
$, | |
Component, | |
get, | |
set | |
} = Ember; |
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 deeplySet from '../utils/deeply-set'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
hierarchy: {}, | |
init() { | |
this._super(...arguments); | |
deeplySet(this.get('hierarchy'), 'company.region.department.employee.name', 'Jim Bob'); |