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

Use of multiple switch elements gives duplicate id warning in console #438

Open
ravtoleakshay opened this issue Jun 25, 2021 · 3 comments
Open

Comments

@ravtoleakshay
Copy link

<ui-switch [id]="module.id" [name]="module.id" [ngModel]="module.is_selected"> </ui-switch>

I am using above element in a loop, I am getting warning in console regarding duplicate id.
As by default ui-switch element adds id with value 'enabled' and its static we cannot bind it.

I want a way to bind id attribute using [id]="module.id"

Thanks in advance !

@cmckni3
Copy link
Collaborator

cmckni3 commented Feb 2, 2022

does attr.id work or do you need to bind it to an element inside of the switch?

@cmckni3
Copy link
Collaborator

cmckni3 commented Aug 25, 2022

does attr.id work or do you need to bind it to an element inside of the switch?

@ravtoleakshay Any update? Will close otherwise

@pankajasswani
Copy link

@cmckni3 Facing same issue. this issue causes WCAG errors.
[attr.id]="some-id" does not work.

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

No branches or pull requests

3 participants