Skip to content

Instantly share code, notes, and snippets.

@jgwhite
Last active August 29, 2015 14:19
Show Gist options
  • Save jgwhite/f7e43a31dbad9500c6eb to your computer and use it in GitHub Desktop.
Save jgwhite/f7e43a31dbad9500c6eb to your computer and use it in GitHub Desktop.
import Ember from 'ember';
const { computed, inject } = Ember;
export default Ember.Service.extend({
store: inject.service(),
isPending: computed.readOnly('all.isPending'),
all: computed('store', function() {
let store = this.get('store');
return store.find('activity');
})
});
{{#if activities.isLoaded}}
{{! Show activities...}}
{{else}}
{{x-loader}}
{{/if}}
{{! Or... }}
{{#if activities.isUpdating}}
{{x-loader}}
{{/if}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment