Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Prefix component attributes with "data-" in usage examples #117

@radoslawn-kainos

Description

@radoslawn-kainos

Otherwise browsers might treat some attributes (e.g. "title") specially.

To see it in action, go to gov-personal-details component example, Angular Markup tab, and hover the mouse over the rendered component. On Chrome, a tooltip appears with "$ctrl.title" in it.

To avoid such surprises, it would probably be best practice to add "data-" prefix when using any custom attribute (even on custom elements).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions