Skip to content

Update content sub-section: Components: Passing Arguments #431

Closed

Description

@MelSumner

Goal

Update the "Passing Arguments" sub-section of the Components section of the Octane guides so it is consistent with the Octane edition of Ember.

TODO

  • write content for sub-section
  • ensure code samples are included

References

This issue is a part of the Component section tracking issue

Activity

  1. added
    time-sensitive
    on Feb 12, 2019
  2. changed the title [-]Update Content sub-section: Components: Passing Arguments[/-] [+]Update content sub-section: Components: Passing Arguments[/+] on Feb 12, 2019
  3. CodingItWrong commented on Feb 14, 2019

    @CodingItWrong
    Contributor

    it seems like angle bracket components may not support positional params. The Syntax Conversion Guide suggests that updating positional params to angle brackets involves named arguments instead.

    I can think of four possible ways to address this:

    1. If angle brackets do support positional params, we should update this guide section to use it. I'm happy to make that change, but I'd need help to know how to use positional params with angle brackets. <TestComponent 'foo' 'bar' /> gives me the error "' is not a valid character within attribute names"
    2. If angle brackets don't support positional params, we could remove the positional params section from the guides, since the guides now teach angle brackets and angle brackets don't support positional params.
    3. Or, we could keep the positional params section with curly syntax, and add a note that you have to use curly syntax if you want to use positional params.
    4. Or, we could mention that positional params used to be supported, but aren't in angle brackets.

    I recommend options 1 or 2 over 3 or 4, so that we keep the guides focused on the new angle brackets approach.

    I'm happy to make whichever change we choose, just need help choosing!

  4. jenweber commented on Feb 14, 2019

    @jenweber
    Contributor

    @CodingItWrong positional params are not directly supported in Angle Brackets.

    Another option is, replace the section with steps to make your own positional params support in Angle Brackets.

    I lean towards #2 because positional params are not considered best practice anyway.

  5. CodingItWrong commented on Feb 15, 2019

    @CodingItWrong
    Contributor

    Feedback from @locks via Discord:

    I think adding a note about only curlies supporting them is fine for now
    and remove it in the MVP
    "only classic invocation syntax supports positional params. to learn more, see the "

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Octanetime-sensitive

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions