inject as service } from '@ember/service'; import AjaxService from 'ember-ajax/services/ajax'; export default class extends AjaxService { @service session; namespace = '/api/v2'; @computed('session.{isAuthenticated,header}') get headers() { if (this.session.isAuthenticated) { return this.session.header; } } }
model instance 2. Pass it to a component <UserEditor @person={{this.person}} /> 3. Mutate the model from the component @action randomize() { this.args.person.randomizeAge(); }
in Ember Data Internal survey Broccoli 2 New Ember CLI docs Ember Times 51x Element modifiers emberjs.com is an Ember app Decorators ember-template-lint Tracked properties Documentary RecordData ember-auto-import Testing improvements <AngleBrackets /> Async leak detection New guides TOC Editions JS classes Rehydration Async testing Reader questions Public infra redux Babel parallel compilation Roadmap RFC