-
Notifications
You must be signed in to change notification settings - Fork 67
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
Feat/support html attributes #61
Feat/support html attributes #61
Conversation
@nicolaspayot heya, let me know if there're any improvements I can make - thanks! |
@nlitwin thanks for you work, it looks really interesting. Sorry for the late answer, I was on holiday. Currently reviewing your PR! |
@nlitwin LGTM! However, I think there's now more complexity in some parts of the code because of the introduction of several Concerning |
@nicolaspayot Thank you for your time and taking a look! I agree that the I saw there was a small merge conflict, so I fixed that. If there's anything else, just let me know! 😄 |
Description
This pull requests adds support for passing down regular HTML attributes like
tabindex
anddisabled
from thengVue
component to the Vue root element. Please see original issue described in #60 for an example.Todos
<button tabindex="1"></button>
)<button disabled></button>
)<button tabindex="ctrl.myTabindex"></button>
)data-
attributes (Angular normalizes them and strips the data- part out by default)inheritAttrs: false
and binding$attrs
to a non-root element worksNotes
In working on this PR, I noticed a few places that check for either
vProps
orvData
, but as far as I could tell,vData
is just an alias. Is it needed? If not, I think the code could be cleaned up a bit and some of the utility functions likegetExpressions/watchExpressions
andif/else
blocks could be simplified. Let me know! IfvData
isn't needed, I'm happy to remove it and refactor.