angular-ui-switch icon indicating copy to clipboard operation
angular-ui-switch copied to clipboard

Directive produces duplicate ID in DOM - Invalid HTML

Open massimocode opened this issue 9 years ago • 0 comments

Please see the following: https://code.angularjs.org/1.4.8/docs/api/ng/service/$compile

It says:

The replacement process migrates all of the attributes / classes from the old element to the new one. See the Directives Guide for an example.

Angular applies ID to the outermost span whilst the code explicitly applies ID manually to the hidden input checkbox. That results in duplicate unnecessary IDs which is invalid HTML.

massimocode avatar Sep 23 '16 07:09 massimocode