mat-icon with svg does not work in MatDialog
See original GitHub issueBug, feature request, or proposal:
I switched to svg icons and now any mat-icons I have on dialogs do not read the svg from the registry.
What is the expected behavior?
svg icon should display in a dialog
What is the current behavior?
svg icon does not appear in dialog.
What are the steps to reproduce?
I created a repo here. https://github.com/crowmagnumb/svg-icon. Simply clone it, run …
git clone git@github.com:crowmagnumb/svg-icon.git
cd svg-icon
yarn install
gulp pug
ng serve
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Is there anything else we should know?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Mat Table is not appearing on MatDialog in Angular 13?
I wanna to display the Mat Table inside the Mat Dialog Box. My requirement is display the list of notifications in the pop...
Read more >How to: Use Angular Material's Mat-Icon with local SVG Images?
This component works with web fonts like Font-Awesome for instance, simply by adding the name of the image required and an image is...
Read more >How to use mat-icon in angular? - GeeksforGeeks
It is better to use mat-icon as they serve SVG icons i.e. vector-based icons which are adaptable to any resolution and dimension, ...
Read more >how to prevent mat dialog close on click outside - You.com
dialog.open(DialogComponent, { disableClose: true }); /* Subscribe to events emitted when the backdrop is clicked NOTE: Since we won't actually be using the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Um, the least you could have done is tell me what you did to make it work which was to change the app component decorator from this
to
removing the
viewProviders: [MatIconRegistry]
direction. All examples and documentation says to do this. If you add it back in you will see that the icon does not appear on the dialog.So is it no longer required/suggested to set this as a viewProvider?
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.