juanjotorres90 / ngx-material-intl-tel-input

Introducing an Angular library designed to streamline the input and validation of international telephone numbers.
https://www.npmjs.com/package/ngx-material-intl-tel-input
MIT License
7 stars 2 forks source link

Component ID generation collision #8

Open sigveholmen opened 2 weeks ago

sigveholmen commented 2 weeks ago

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

juanjotorres90 commented 5 days ago

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:

`

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