-
Notifications
You must be signed in to change notification settings - Fork 30
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
ES6 Getters/Setters support #79
Comments
Hey @imajus interesting thought, wondering what was the reason that you said you had to use them? |
@dburles Using Collection instances in Handlebars E-mail templates on the server. So I need |
I absolutely agree that this would be very useful, especially for computed properties. Authors.helpers({ get fullName() { return `${this.firstName} ${this.lastName}`; } });
And I can confirm that the above fix by @imajus (thanks a lot!) works correctly (using it myself). |
Seems great! How can i use this? |
I had to use get/set ES6 syntax in helpers but plugin didn't support those. Here's a patch I suggest to apply in order to support getters/setters in helpers:
The patch is backward compatible with old good helper methods.
With that change the following helpers start working:
The text was updated successfully, but these errors were encountered: