Last active
July 15, 2017 00:47
-
-
Save akatov/2aaa2dd10e0200e0e5e43a52c5f04b54 to your computer and use it in GitHub Desktop.
ember-co twiddle 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 DS from 'ember-data'; | |
import co, { wrap } from 'ember-co'; | |
export default Ember.Controller.extend({ | |
_bla: wrap(function*(a) { | |
return yield Ember.RSVP.resolve(a + a); | |
}), | |
app: Ember.computed(function() { | |
let self = this; | |
return DS.PromiseObject.create({ | |
promise: co(function*() { | |
let name = yield self._bla('Application'); | |
return { name }; | |
}) | |
}); | |
}), | |
}); |
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
{ | |
"version": "0.11.1", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.11.0", | |
"ember-data": "2.11.0", | |
"ember-template-compiler": "2.11.0", | |
"ember-testing": "2.11.0", | |
"babel-polyfill":"https://cdn.rawgit.com/nicksrandall/babel-polyfill/master/browser-polyfill.js" | |
}, | |
"addons": { | |
"ember-co": "1.0.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment