Created
March 9, 2016 20:09
-
-
Save anonymous/000afbaf47fe4bc3092c to your computer and use it in GitHub Desktop.
promiseproxy service
This file contains hidden or 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, inject, ObjectProxy, PromiseProxyMixin } = Ember; | |
export default ObjectProxy.extend(PromiseProxyMixin, { | |
isServiceFactory: true, | |
store: inject.service(), | |
promise: computed({ | |
get() { | |
var store = this.get('store'); | |
return store.findRecord('community', window.community.id); | |
} | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment