Quantcast
Channel: User Simon_Weaver - Stack Overflow
Viewing all articles
Browse latest Browse all 116

Answer by Simon_Weaver for Loading icon from Material Icon Registry errors out with " tag not found"

$
0
0

You can get this error if you use

this.registerIcon('cart-icon', '/assets/images/icons/cart_icon.svg');

instead of

this.registerIconPath('cart-icon', '/assets/images/icons/cart_icon.svg');

If you use the first, it literally tries to use the URL alone as the innerHtml property of the containing DIV and then when it looks for an <svg> inside it just finds text.


Updating to es-build note:

I ended up running into this when removing svg-inline-loader during updates to Angular 17 / esbuild and forgot to change to the correct register function!

this.registerIcon('down-arrow', require('!svg-inline-loader?classPrefix!'+'src/assets/images/icons/arrow_white_down.svg'));

Viewing all articles
Browse latest Browse all 116

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>