Useful decorators for Ember applications.
v2.0.0 is a major refactor that pushes all of the individual packages from Ember Decorators out into individual packages. The core addon is still around, but it's now a shell addon that includes the others.
Highlights:
Breaking Changes:
Imports should now be from the scoped packages instead of the main addon:
// before
import { computed } from 'ember-decorators/object';
// after
import { computed } from '@ember-decorators/object';
@attribute
and @className
no longer place the value of class fields on the prototype of the class. If you want to set defaults, you'll need to use an initializer:
// before
@className foo = 'bar';
// after
@className foo = this.foo || 'bar';
Support for decorating plain functions using @computed
has been removed. You must now decorate native getters and setters:
// before
@computed
foo() {
return 'bar';
}
// after
@computed
get foo() {
return 'bar';
}