Skip to content
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

Nested sub-expressions with parentheses fail #5066

Closed
stephentcannon opened this issue Aug 29, 2015 · 3 comments
Closed

Nested sub-expressions with parentheses fail #5066

stephentcannon opened this issue Aug 29, 2015 · 3 comments

Comments

@stephentcannon
Copy link

Per https://github.com/meteor/meteor/tree/devel/packages/spacebars#nested-sub-expressions

Per the documentation, "Sub-expressions can be used to calculate key-word arguments, too:"

{{> tmpl arg=(helper post)}}

My example below calls a helper registered as Template.registerHelper because it is used throughout the application.

{{> quickForm collection="Loans" id="insertLoan" type="insert" buttonClasses="btn btn-primary btn-lg btn-block" validation="submit" buttonContent=(i18nFormatContent 'Apply for Loan')}}

and errors because of the parentheses

client/views/dashboard/dashboard.html:6: Expected identifier, number, string, boolean, or null
...ubmit" buttonContent=(i18nFormatContent '...

Is the documentation wrong?

Please advise.

@Slava
Copy link
Contributor

Slava commented Aug 29, 2015

You are looking at the docs on devel branch where the feature is implemented. The latest release can be found on master - it doesn't have the subexpression implementation yet.

@stephentcannon
Copy link
Author

Doh!

@PareshSolankiMI
Copy link

(_ 'post')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants