Skip to content

Some IE11 cleanups accidentally landed in 12.2.x #23736

Closed
@thedavids

Description

@thedavids

Reproduction

Steps to reproduce:

  1. Use @angular/material version 12.2.8 or later
  2. Import the MatBadgeModule in your app module
  3. Create a div with a matBadge (ex: <div [matBadge]="123">Test)
  4. Open in Internet Explorer to see the badge is not displayed and that there is an error in the console

It seems to be because of this line
const badges = this._elementRef.nativeElement.querySelectorAll(:scope > .${BADGE_CONTENT_CLASS});
located in this method _clearExistingBadges
In the badge component

Expected Behavior

We should see the badge correctly even in IE

Actual Behavior

The badge is not displayed and we have a syntax error in the IE console

Environment

  • Angular: 12.2.8
  • CDK/Material: 12.2.8
  • Browser(s): Internet Explorer
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows

Metadata

Metadata

Assignees

Labels

P1Impacts a large percentage of users; if a workaround exists it is partial or overly painfularea: material/badgearea: material/chips

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions