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

fix: 🐛 component-id collision error NG0912 #624

Merged

Conversation

matheo
Copy link
Contributor

@matheo matheo commented Aug 1, 2023

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Running tests with Spectator 15.0.1 inside the latest Nx (16.6.0) it is throwing this warning:
image

NG0912: Component ID generation collision detected. Components '_HostComponent' and 'TestComponent'
with selector 'ng-component' generated the same component ID. To fix this, you can change the selector
of one of those components or add an extra host attribute to force a different ID.
Find more at https://angular.io/errors/NG0912

What is the new behavior?

I removed the warning adding a selector to HostComponent

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Angular CLI: 16.1.6
Node: 18.16.1
Package Manager: npm 9.5.1
OS: linux x64

Angular: 16.1.7
... animations, common, compiler, compiler-cli, core, elements
... forms, language-service, platform-browser
... platform-browser-dynamic, router

@stackblitz
Copy link

stackblitz bot commented Aug 1, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@matheo matheo force-pushed the fix/component-id-collision/NG0912 branch from d6117e7 to 49c2d09 Compare August 1, 2023 22:32
@NetanelBasal NetanelBasal merged commit 05d51d5 into ngneat:master Aug 2, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants