Created
March 9, 2018 20:51
-
-
Save EWhite613/2d5c68bba09fd2241c3e67a65e30e991 to your computer and use it in GitHub Desktop.
New 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 DS from 'ember-data' | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
foo: Ember.computed(() => { | |
return DS.PromiseObject.create({ | |
promise: new Promise(function(resolve) { | |
setTimeout(() => {resolve({bar: 42})}, 2000) | |
}) | |
}) | |
}), | |
isDisabled: Ember.computed('foo.bar', function () { | |
let blah = this.get('foo.bar') | |
if (blah) { | |
return 'resolved' | |
} else { | |
return 'nope' | |
} | |
}) | |
}); |
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.13.0", | |
"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.16.2", | |
"ember-template-compiler": "2.16.2", | |
"ember-testing": "2.16.2" | |
}, | |
"addons": { | |
"ember-data": "2.16.3" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment