-
Notifications
You must be signed in to change notification settings - Fork 33
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
update confusing usage example in readme #38
update confusing usage example in readme #38
Conversation
README.md
Outdated
{{#each this.availableCountries as |country|}} | ||
{{#s.option value=country}}{{country.name}}{{/s.option}} | ||
{{#option value=country}}{{country.name}}{{/s.option}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can't call a non-angle bracket component without a dash, that is why the API is different. To make it similar you'd use {{#component option value=country}}
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course. Missed that one. So maybe it should be done the other way round? Assuming it returns a hash and updating the angle bracket syntax accordingly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or is it attended to show this difference? At least without an explanation that was very confusing to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other way around makes sense to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the PR accordingly.
72f5227
to
86ec2f0
Compare
Please note, that |
Example assumed that component yields a hash before but a component after changing syntax. Since angle bracket invocation does not affect yielded value it should be the same before and after. [ci skip]
86ec2f0
to
5916976
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Example assumed that component yields a hash before but a component after changing syntax. Since angle bracket invocation does not affect yielded value it should be the same before and after.
It's the same in RFC. Not quite sure if the RFC should be changed also even so it's already merged.