Skip to content
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

Angular selector does not follow angular selector names #1442

Open
1 of 12 tasks
seofernando25 opened this issue May 11, 2024 · 0 comments · May be fixed by #1443
Open
1 of 12 tasks

Angular selector does not follow angular selector names #1442

seofernando25 opened this issue May 11, 2024 · 0 comments · May be fixed by #1443
Labels
bug Something isn't working

Comments

@seofernando25
Copy link

seofernando25 commented May 11, 2024

I am interested in helping provide a fix!

Yes

Which generators are impacted?

  • All
  • Angular
  • HTML
  • Preact
  • Qwik
  • React
  • React-Native
  • Solid
  • Stencil
  • Svelte
  • Vue
  • Web components

Reproduction case

The default playground example using the Angular output

Expected Behaviour

@Component({
  selector: "my-component",

Actual Behaviour

@Component({
  selector: "my-component, MyComponent",

https://angular.io/guide/styleguide#component-selectors

Additional Information

Source Line:

selector: `'${kebabCase(json.name || 'my-component')}, ${json.name}'`,

See angular style guide for components selector

don't mind the specific prefix warning, the issues is regarding the ", Counter"

image

I suggest we change make these changes

- selector: `'${kebabCase(json.name || 'my-component')}, ${json.name}'`,
+ selector: `'${kebabCase(json.name || 'my-component')}`,
@seofernando25 seofernando25 added the bug Something isn't working label May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant