Skip to content

Instantly share code, notes, and snippets.

Created March 9, 2016 20:09
Show Gist options
  • Save anonymous/000afbaf47fe4bc3092c to your computer and use it in GitHub Desktop.
Save anonymous/000afbaf47fe4bc3092c to your computer and use it in GitHub Desktop.
promiseproxy service
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