Emberjs – Function as variable in controller

Just putĀ “Ember.computed()” around your function. Example: sessionsMeta: Ember.computed(function() { this.store.query(‘session’).then((result) => { let meta = result.get(‘meta’); return meta; }); })