New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
provide ability
computed macro as a named export
#70
Comments
I just came across this addon and immediately noticed the conflict with I noticed that @Exelord was recently added as a contributor to help maintain the project; any thoughts on this? |
Hey! Unfortunately, Im not added yet 😅But yes, we can definitely improve public API and deprecate the old ones.
import { computed } from '@ember/object';
can: Ember.inject.service(),
postModel: computed(function(){
return 'my model';
}),
ability: computed('postModel', function() {
return this.get('can').build('post', this.get('postModel'));
}) I would also consider renaming |
PR: #79 |
Now that we have the new Ember javascript modules API I think it would make sense to export the
ability
computed macro as its own export.We could then use it like:
Another problem the current API has is that it is incompatible with ember's modules API unless you do some aliasing because you now import
computed
using:which collides with
What I am doing at the moment is:
It wouldn't break existing codebases since we would still be exporting
computed
as we are now.We would also update the README to use this new API.
Is anyone opposed to this change?
The text was updated successfully, but these errors were encountered: