-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Have component
template helper pass through HTML attributes
#18240
Comments
I believe this was a recognized feature gap on the original angle bracket invocation RFC, and we've intended to address it in time, just haven't gotten around to it. There is some prior discussion on the RFC repo here: emberjs/rfcs#497 |
After looking through the linked issue in the RFC repo, it looks like there's really not a workaround for the time being for my use case (yielding out a pre-configured component). I'll look at using component properties for those fields for now. |
This may not be very satisfying, but the “workaround” in the meantime is to create a wrapper component and yield that. |
Sorry for the run around here @barryofguilder, I'm going to close this one in favor of moving the discussion over into emberjs/rfcs#497. |
This is split off from #18232
I have an angle bracket component that's using "splattributes" and I'm trying to invoke it through yielding it out with the
component
template helper. When I try to pass HTML attributes using that, it doesn't properly get overriden.For example, take this button component:
And this form component that yields out the button component:
Invoking the form component results in the following HTML output:
Are there any plans for the
component
template helper to pass along HTML attributes? If not, what is an alternative to yielding out components like this?The text was updated successfully, but these errors were encountered: