-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functions
Description
What is the expected behavior?
The MatIconRegistry returns the correct icon using MatIconRegistry._extractSvgIconFromSet.
What is the current behavior?
MatIconRegistry._extractSvgIconFromSet cannot find the icon due to an incorrect query selector.
What are the steps to reproduce?
Register a SVG icon set containing a SVG with id "icon-300 my icon"
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular Material 5.1.0 and higher
Is there anything else we should know?
Currently the MatIconRegistry makes use of iconSet.querySelector('#' + iconName):
https://github.com/angular/material2/blob/master/src/lib/icon/icon-registry.ts#L452
Instead it should be using iconSet.getElementById(iconName)
Then in my case it returns the correct SVG element.
Metadata
Metadata
Assignees
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functions