juanjotorres90/ngx-material-intl-tel-input

Component ID generation collision

Closed this issue · 2 comments

I get the following warning message, while retaining full functionality of the component:

NG0912: Component ID generation collision detected. Components '_MatFormField' and '_MatFormField2' with selector 'mat-form-field' 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.dev/errors/NG0912

Environment:
Angular CLI: 18.0.4
Node: 20.14.0
Package Manager: npm 10.7.0
OS: darwin x64
@angular-devkit/architect 0.1800.4
@angular-devkit/build-angular 18.0.4
@angular-devkit/core 18.0.4
@angular-devkit/schematics 18.0.4
@angular/cdk 17.3.10
@angular/cli 18.0.4
@angular/fire 18.0.1
@angular/material 17.3.10
@angular/ssr 18.0.4
@schematics/angular 18.0.4
rxjs 7.8.1
typescript 5.4.5
zone.js 0.14.4

Could you provide an environment to reproduce it?

It is possible that one of the selectors that you use in your app is generating the same id as the MatFormField selectors used in the library.

These are the two MatFormField used in the library:

<mat-form-field appearance="fill" class="prefix-form-field">

<mat-form-field appearance="fill" class="number-form-field">

Also noticed that you're using Angular Material/CDK 17 versions and the rest of Angular packages are updated to Angular 18.

This issue has been closed due to inactivity.
Please file a new issue if you are encountering a similar or related problem.