Skip to content

Directive produces duplicate ID in DOM - Invalid HTML #53

@massimocode

Description

@massimocode

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions