-
Notifications
You must be signed in to change notification settings - Fork 169
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
Refactor: Replace @HostBinding with host property of Component Decorator #58
Conversation
Someone is attempting to deploy a commit to a Personal Account owned by @goetzrobin on Vercel. @goetzrobin first needs to authorize it. |
Looks good to me! There is a tiny conflict after merging a different PR, once you fix that one I will merge it! |
@elite-benni Thank you! That was fast! |
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.
LGTM. Though I have a non-blocking question, some places still use generateClasses()
private method while some other places don't. Can we make this more consistent?
Sure, I can do this. The whole idea of this change was to make it more consistent. Thanks for pointing that out. I will add readonly to the signals. |
Btw you can run |
I merged the conflict in github. ;) thats why i missed the empty line ;) |
🚀 Thanks for making those changes! |
PR Checklist
Please check if your PR fulfills the following requirements:
guidelines: https://github.com/goetzrobin/spartan/blob/main/CONTRIBUTING.md#-commit-message-guidelines
PR Type
What kind of change does this PR introduce?
Which package are you modifying?
What is the current behavior?
The Binding of the Class is set to Host with a @HostBinding, which is not the preverred approach as stated in angular.dev.
@HostBinding also does not work with onPush Parent Components and changes to the property.
Closes #
What is the new behavior?
The classes are bound to the host property of the component decorator.
Signals or computed that are bound via host property also work with changes.
Does this PR introduce a breaking change?
Other information
I also implemented the userCls signal in every Component with the same structure, so we should not have a too hard time when migrating to signal based inputs.
closes #55