-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Using "rest arg" version of positionalParams
breaks hash only version.
#12444
Comments
The entire point of Using the example from one of the tests added in #12445:
Invoking that component with all three of these lines should result in exactly the same attrs: {{foo-bar "one" "two"}}
{{foo-bar "one" second="two"}}
{{foo-bar first="one" second="two"}} The above example works properly today (the test added for that in #12445 is simply confirmation as no changes to the "named" version were made). Using the "rest" argument version should be exactly the same concept: "use positional params if you want, or use hash arguments". |
You are thinking about the discussion that lead to #12350, which added assertions if you use the same hash argument as a named positional param. That assertion is still 100% the desired behavior, #12445 makes the named and rest versions of this API the same in that regard. |
Sounds good! 👍 |
Cannot specify
positionalParams
as a string (which would set the params array to a property of at that location) and specify a hash argument instead of positional params. The assertion added in #12350 is triggered even if no non-hash params are present:Demo: http://rwjblue.jsbin.com/zeqowe/edit?html,js,output
The text was updated successfully, but these errors were encountered: