Using ember-concurrency to easily load data inside a component
import { task } from 'ember-concurrency';
import { readOnly } from '@ember/object/computed';
export default Component.extend({
tags: readOnly('loadTags.lastSuccessful.value'),
loadTags: task(function * () {
return yield this.get('store').findAll('tags');
}).on('init')
});