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[Angular]: Allow passing explicit selectors #1443
base: main
Are you sure you want to change the base?
Conversation
|
~~I'm having some issues running the snapupdates. ~~
SOLUTION: Manually ran |
selector: `'${kebabCase(json.name || 'my-component')}, ${json.name}'`, | ||
selector: options.selector | ||
? `'${options.selector}'` | ||
: `'${kebabCase(json.name || 'my-component')}, ${json.name}'`, |
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.
I would suggest to remove the ${json.name}
as default.
If a users wants to overwrite the selector with non kebabCase
they may use options.selector
.
Description
Adds an explicit,
selector
option, allowing to override the default,selector: `'${kebabCase(json.name || 'my-component')}, ${json.name}'`
This doesn't quite work if you have more than one component per project since all of them would have the same name
Another option could try is to keep as is and leave the warning there.
Closes #1442
Also see: angular's style guide
Relevant PR that added it in the first place
EDIT: Ok I think I can see why it was added there in the first place... might be wise to allow overriding the
selector