vmware-archive / clarity

Clarity is a scalable, accessible, customizable, open source design system built with web components. Works with any JavaScript framework, built for enterprises, and designed to be inclusive.
http://clarity.design
MIT License
6.43k stars 763 forks source link

[@Cds/Card] Uncaught DOMException: Failed to construct 'CustomElement': The result must not have attributes #6590

Closed KishanRavindran closed 2 years ago

KishanRavindran commented 2 years ago

Describe the bug

When adding the cds card in angular 12 project I am getting the error/warning as "Uncaught DOMException: Failed to construct 'CustomElement': The result must not have attributes" But not the same when adding other cds web components.

How to reproduce

Create a angular project and install the below npm npm install @cds/core @cds/city --save and then install ng add @cds/angular

Also add these in the styles.scss or style.css file

@import '~modern-normalize/modern-normalize.css'; // css reset
@import '~@cds/core/global.min.css'; // clarity global styles
@import '~@cds/city/css/bundles/default.min.css'; // load base font

Also you can follow the angular installation following the steps for angular from this link

Steps to reproduce the behavior:

  1. Go to any component html file
  2. Add the cds card code in the html file as in this link
  3. Then run the angular project.
  4. When go to the UI page which has the cds-card html been added you will be able to see this error as Uncaught DOMException: Failed to construct 'CustomElement': The result must not have attributes

Clarity project:

Clarity version:

Framework:

Framework version: Angular 12

Device:

astorije-vmware commented 2 years ago

Duplicate of #6589, except I didn't realize this also happens on Angular!

github-actions[bot] commented 2 years ago

Hi there 👋, this is an automated message. To help Clarity keep track of discussions, we automatically lock closed issues after 14 days. Please look for another open issue or open a new issue with updated details and reference this one as necessary.