ember-nf-graph icon indicating copy to clipboard operation
ember-nf-graph copied to clipboard

app/ components need to use the new cp syntax

Open jayphelps opened this issue 10 years ago • 0 comments

Apparently when I did https://github.com/Netflix/ember-nf-graph/pull/63, I missed the entire app/ directory......

New syntax with polyfill looks like this:

import computed from 'ember-new-computed';

export default Ember.Component.extend({
  fullName: computed('firstName', 'lastName', {
    get() {
      return this.get('firstName') + ' ' + this.get('lastName');
    },
    set(key, newName) {
      var parts = newName.split(' ');
      this.setProperties({ firstName: parts[0], lastName: parts[1] });
      return newName;
    }
  });
});

Getter-only should still use this syntax, just not include a set()

jayphelps avatar Jun 04 '15 20:06 jayphelps